Create dashboard elements with pictures from the SuperOffice database

Product requirements: SuperOffice Analyze PRO

SuperOffice Sales & Marketing include pictures and graphics in their database.

In the SuperOffice client you can add pictures for Persons and Projects.

So why not use theese picture when you create dashboard?

In the SuperOffice Analyze package there is a method for extracting thoose images and make them available in a dashboard element.

 

The URL to the Superoffice image extractor is:

http://BASERVER/ANALYZEPRO/soedition/soimage.aspx?id=11&table=6&factor=1&width=300&height=200&owner=crm7

You should replace the following text:
BASERVER - with your name of the server
ANALYZEPRO - with the name of your virtual directory

 

URL syntax:

id = person_id from "person"-table or "associate"-table

table = table_id in SuperOffice (6 = PERSON, 11=project). For a complete reference see SO database SDK.

factor = Resize factor, set it to 1 (no resize), if 0.5 you got 50% resize..

width = If you want to rescale the picture set the width in pixels

height = If you want to rescale the picture set the height in pixels 
(To get correct aspect ratio set only value on width or height, do not add the one to the URL which is not used)

owner = crm7 (the owner of the database table in SuperOffice, normal this is crm7. Default is crm5 so you must override it)

 

How to enable this in a dashboard?

First of all you need to use a datatable which have the column with the ID you are going to use (example person_id or project_id).

In the dashboard editor you should right click the ID-column and do the following set-up:

Value formatting must be turned off to enable use of expression on the column.

 

Then you add the expression, which contains the URL to the image extrator and the column ID.
In the above example [SOPersonID]. You should use brackets around the native name of the column [ ] .

Here is the expression for cut and paste:

person_id:

=img("url":"../../soedition/soimage.aspx?id=[person_id]&table=6&factor=1&width=80&height=60&owner=crm7");

project_id:

=img("url":"../../soedition/soimage.aspx?id=[project_id]&table=11&factor=1&width=80&height=60&owner=crm7");

 

 

How to query which picture are available in the database?

If you want to check the database of which elements that are available, you can run the following query againt the SuperOffice database from SQL Management Studio:

select

      bo.mimeType,

      bo.description,

      bo.originalSize,

      bo.binaryData,

      bl.ownerRecord,

      bl.ownertable

from

      crm7.binaryobject bo,

      crm7.binaryobjectlink bl

where

      bo.binaryobject_id=bl.binaryobjectid