Interface IDashAgent
Interface for the Dash Agent Agent that lets you configure dashboard tiles and retrieve dashboard data
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Dash Agent", "Interface for the Dash Agent. Agent that lets you configure dashboard tiles and retrieve dashboard data")]
public interface IDashAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
Methods
AddNewTileToDashboard(Int32, DashTileDefinition)
Add a new tile to a dashboard with next rank
Declaration
DashTile AddNewTileToDashboard(int dashboardId, DashTileDefinition dashTileDefinition)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The id of the dashboard to add the tile to |
DashTileDefinition | dashTileDefinition | The tile definition data to add to the dashboard |
Returns
Type | Description |
---|---|
DashTile | The newly added tile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
AddTileToDashboard(Int32, Int32)
Add a tile to a dashboard with next rank
Declaration
DashTile AddTileToDashboard(int dashboardId, int dashTileDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The id of the dashboard to add the tile to |
Int32 | dashTileDefinitionId | The id of the dashboard tile definition |
Returns
Type | Description |
---|---|
DashTile | The newly added tile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CopyTileSelection(Int32)
Copy Tile Selection for the dashboard
Declaration
int CopyTileSelection(int selectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | selectionId | The id of the selection to copy from |
Returns
Type | Description |
---|---|
Int32 | Selection Id |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDashTileSelectionFromEntity(String)
Returns the id to a dashboard tile selection
Declaration
int CreateDashTileSelectionFromEntity(string entityName)
Parameters
Type | Name | Description |
---|---|---|
String | entityName | The name of the entity to create a default selection for |
Returns
Type | Description |
---|---|
Int32 | Selection Id |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultDash()
Loading default values into a new Dash. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Dash CreateDefaultDash()
Returns
Type | Description |
---|---|
Dash | New Dash with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultDashCollection()
Loading default values into a new DashCollection. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
DashCollection CreateDefaultDashCollection()
Returns
Type | Description |
---|---|
DashCollection | New DashCollection with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultDashTheme()
Loading default values into a new DashTheme. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
DashTheme CreateDefaultDashTheme()
Returns
Type | Description |
---|---|
DashTheme | New DashTheme with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultDashTile()
Loading default values into a new DashTile. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
DashTile CreateDefaultDashTile()
Returns
Type | Description |
---|---|
DashTile | New DashTile with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultDashTileDefinition()
Loading default values into a new DashTileDefinition. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
DashTileDefinition CreateDefaultDashTileDefinition()
Returns
Type | Description |
---|---|
DashTileDefinition | New DashTileDefinition with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultPreviewDash()
Loading default values into a new PreviewDash. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
PreviewDash CreateDefaultPreviewDash()
Returns
Type | Description |
---|---|
PreviewDash | New PreviewDash with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultPreviewDashTile()
Loading default values into a new PreviewDashTile. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
PreviewDashTile CreateDefaultPreviewDashTile()
Returns
Type | Description |
---|---|
PreviewDashTile | New PreviewDashTile with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultTileDefinitionForEntity(String)
Set Measure to CountAll and MeasureField to primary key field
Declaration
DashTileDefinition CreateDefaultTileDefinitionForEntity(string entityName)
Parameters
Type | Name | Description |
---|---|---|
String | entityName | Name of entity to use for primary key |
Returns
Type | Description |
---|---|
DashTileDefinition | Default |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
CreateDefaultTileForEntity(String)
Set Measure to CountAll and MeasureField to primary key field
Declaration
DashTile CreateDefaultTileForEntity(string entityName)
Parameters
Type | Name | Description |
---|---|---|
String | entityName | Name of entity to use for primary key |
Returns
Type | Description |
---|---|
DashTile | Default |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DeleteDash(Int32)
Deletes the Dash
Declaration
void DeleteDash(int dashId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashId | The identity of the Dash |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DeleteDashTheme(Int32)
Deletes the DashTheme
Declaration
void DeleteDashTheme(int dashThemeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashThemeId | The identity of the DashTheme |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DeleteDashTile(Int32)
Deletes the DashTile
Declaration
void DeleteDashTile(int dashTileId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashTileId | The identity of the DashTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DeleteDashTileDefinition(Int32)
Deletes the DashTileDefinition
Declaration
void DeleteDashTileDefinition(int dashTileDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashTileDefinitionId | The identity of the DashTileDefinition |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DuplicateDashboard(Int32, String)
Duplicate for the dashboard and all the sub elements
Declaration
Dash DuplicateDashboard(int dashboardId, string name)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The id of the dashboard to add the tile to |
String | name | The name of the new dashboard |
Returns
Type | Description |
---|---|
Dash | New dashboard |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
DuplicateTile(Int32, String)
Duplicate for the tile and all the sub elements
Declaration
DashTile DuplicateTile(int dashTileId, string name)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashTileId | The id of the tile to copy |
String | name | The name of the new tile |
Returns
Type | Description |
---|---|
DashTile | New tile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDash(Int32)
Gets a Dash object.
Declaration
Dash GetDash(int dashId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashId | The identifier of the Dash object |
Returns
Type | Description |
---|---|
Dash | Dash |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashCollection()
Gets a collection of dashboards for the current associate
Declaration
DashCollection GetDashCollection()
Returns
Type | Description |
---|---|
DashCollection | Dashboard collection |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashList(Int32[])
Gets the ordered list of dashboards
Declaration
Dash[] GetDashList(int[] dashboards)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | dashboards | List of dashboardIds |
Returns
Type | Description |
---|---|
Dash[] | List of dashboards |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTheme(Int32)
Gets a DashTheme object.
Declaration
DashTheme GetDashTheme(int dashThemeId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashThemeId | The identifier of the DashTheme object |
Returns
Type | Description |
---|---|
DashTheme | DashTheme |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTile(Int32)
Gets a DashTile object.
Declaration
DashTile GetDashTile(int dashTileId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashTileId | The identifier of the DashTile object |
Returns
Type | Description |
---|---|
DashTile | DashTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTileDefinition(Int32)
Gets a DashTileDefinition object.
Declaration
DashTileDefinition GetDashTileDefinition(int dashTileDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashTileDefinitionId | The identifier of the DashTileDefinition object |
Returns
Type | Description |
---|---|
DashTileDefinition | DashTileDefinition |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTileHtml(Int32, String)
Get HTML for a dashboard tile definition with TileType = HTML
Declaration
DashTileHtml GetDashTileHtml(int dashboardTileDefinitionId, string languageCode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileDefinitionId | The id of the dashboard tile definition |
String | languageCode | Preferred language code. |
Returns
Type | Description |
---|---|
DashTileHtml | HTML data |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTileHtmlList(Int32)
Get HTML for a dashboard tile definition with TileType = HTML. Retrieve a list with all registered languages.
Declaration
DashTileHtml[] GetDashTileHtmlList(int dashboardTileDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileDefinitionId | The id of the dashboard tile definition |
Returns
Type | Description |
---|---|
DashTileHtml[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetDashTiles(Int32)
Gets the ordered list of tiles for a dashboard
Declaration
DashTile[] GetDashTiles(int dashboardId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The id of the dashboard |
Returns
Type | Description |
---|---|
DashTile[] | Ordered list of dashboard tiles |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetPreviewDash(Int32)
Get a dashboard from its id
Declaration
PreviewDash GetPreviewDash(int dashboardId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | Dashboard ID |
Returns
Type | Description |
---|---|
PreviewDash | Dashboard suitable for preview |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetSecondaryTempTileSelection(Int32)
Copy selection to secondary temporary personal tile selection
Declaration
int GetSecondaryTempTileSelection(int selectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | selectionId | The id of the selection to copy from |
Returns
Type | Description |
---|---|
Int32 | Selection Id |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
GetTempTileSelection(Int32)
Copy selection to temporary personal tile selection
Declaration
int GetTempTileSelection(int selectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | selectionId | The id of the selection to copy from |
Returns
Type | Description |
---|---|
Int32 | Selection Id |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDash(Dash)
Updates the existing Dash or creates a new Dash if the id parameter is empty
Declaration
Dash SaveDash(Dash dash)
Parameters
Type | Name | Description |
---|---|---|
Dash | dash | The Dash that is saved. |
Returns
Type | Description |
---|---|
Dash | New or updated Dash |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDashTheme(DashTheme)
Updates the existing DashTheme or creates a new DashTheme if the id parameter is empty
Declaration
DashTheme SaveDashTheme(DashTheme dashTheme)
Parameters
Type | Name | Description |
---|---|---|
DashTheme | dashTheme | The DashTheme that is saved. |
Returns
Type | Description |
---|---|
DashTheme | New or updated DashTheme |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDashTile(DashTile)
Updates the existing DashTile or creates a new DashTile if the id parameter is empty
Declaration
DashTile SaveDashTile(DashTile dashTile)
Parameters
Type | Name | Description |
---|---|---|
DashTile | dashTile | The DashTile that is saved. |
Returns
Type | Description |
---|---|
DashTile | New or updated DashTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDashTileDefinition(DashTileDefinition)
Updates the existing DashTileDefinition or creates a new DashTileDefinition if the id parameter is empty
Declaration
DashTileDefinition SaveDashTileDefinition(DashTileDefinition dashTileDefinition)
Parameters
Type | Name | Description |
---|---|---|
DashTileDefinition | dashTileDefinition | The DashTileDefinition that is saved. |
Returns
Type | Description |
---|---|
DashTileDefinition | New or updated DashTileDefinition |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDashTileHtmlList(Int32, DashTileHtml[])
Set the HTML data for a tile with TileType = HTML.
Declaration
DashTileHtml[] SaveDashTileHtmlList(int dashboardTileDefinitionId, DashTileHtml[] languages)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileDefinitionId | The id of the dashboard tile definition |
DashTileHtml[] | languages | List of HTML content per language |
Returns
Type | Description |
---|---|
DashTileHtml[] |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}
SaveDashTiles(Int32, DashTile[])
Saves the ordered list of tiles for a dashboard
Declaration
void SaveDashTiles(int dashboardId, DashTile[] dashTiles)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The id of the dashboard |
DashTile[] | dashTiles | The tiles in order |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashAgent agent = new DashAgent())
{
// call methods on agent here...
}
}