Interface IDashboardAgent
Interface for the Dashboard Agent Agent lets you configure dashboard tiles and retrieve dashboard data
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Dashboard Agent", "Interface for the Dashboard Agent. Agent lets you configure dashboard tiles and retrieve dashboard data")]
public interface IDashboardAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultDashboard()
Loading default values into a new Dashboard. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
Dashboard CreateDefaultDashboard()
Returns
Type | Description |
---|---|
Dashboard | New Dashboard with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
CreateDefaultDashboardTile()
Loading default values into a new DashboardTile. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
DashboardTile CreateDefaultDashboardTile()
Returns
Type | Description |
---|---|
DashboardTile | New DashboardTile with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
CreateNewFromTemplate(Int32, String, String, Int32, VisibleFor[])
Create new tile from another tile used as template
Declaration
DashboardTile CreateNewFromTemplate(int dashboardTileId, string caption, string description, int selectionId, VisibleFor[] visibleFor)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileId | Tile template Id |
String | caption | Caption of new tile |
String | description | Description of new tile |
Int32 | selectionId | Selection id of new tile |
VisibleFor[] | visibleFor | Who the tile should be visible for |
Returns
Type | Description |
---|---|
DashboardTile | The new tile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
DeleteDashboard(Int32)
Deletes the Dashboard
Declaration
void DeleteDashboard(int dashboardId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The identity of the Dashboard |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
DeleteDashboardTile(Int32)
Deletes the DashboardTile
Declaration
void DeleteDashboardTile(int dashboardTileId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileId | The identity of the DashboardTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetDashboard(Int32)
Gets a Dashboard object.
Declaration
Dashboard GetDashboard(int dashboardId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | The identifier of the Dashboard object |
Returns
Type | Description |
---|---|
Dashboard | Dashboard |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetDashboards(Int32)
Gets all dashboards for an associate
Declaration
Dashboard[] GetDashboards(int associateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | Associate Id |
Returns
Type | Description |
---|---|
Dashboard[] | All the users dashboards |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetDashboardTile(Int32)
Gets a DashboardTile object.
Declaration
DashboardTile GetDashboardTile(int dashboardTileId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileId | The identifier of the DashboardTile object |
Returns
Type | Description |
---|---|
DashboardTile | DashboardTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetDashboardTiles(Int32[])
Gets an array of dashboard tiles for the provided ids
Declaration
DashboardTile[] GetDashboardTiles(int[] dashboardTileIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | dashboardTileIds | The ids of the tiles to get |
Returns
Type | Description |
---|---|
DashboardTile[] | Dashboard tiles |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetData(Int32, String)
Get data for this tile
Declaration
TileData[] GetData(int dashboardTileId, string restrictions)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileId | Tile Id |
String | restrictions | Replacement restrictions |
Returns
Type | Description |
---|---|
TileData[] | The data |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetDataWithSelection(Int32, Int32, String)
Get data for this tile
Declaration
TileData[] GetDataWithSelection(int dashboardTileId, int selectionId, string restrictions)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardTileId | Tile Id |
Int32 | selectionId | Selection Id |
String | restrictions | Replacement restrictions |
Returns
Type | Description |
---|---|
TileData[] | The data |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
GetStandardDashboardTileFromChartId(String)
Gets the standard tile (not personal tile) corresponding to the given chart id
Declaration
DashboardTile GetStandardDashboardTileFromChartId(string chartId)
Parameters
Type | Name | Description |
---|---|---|
String | chartId | The ChartId of the wanted chart/tile |
Returns
Type | Description |
---|---|
DashboardTile | Standard tile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
SaveDashboard(Dashboard)
Updates the existing Dashboard or creates a new Dashboard if the id parameter is empty
Declaration
Dashboard SaveDashboard(Dashboard dashboard)
Parameters
Type | Name | Description |
---|---|---|
Dashboard | dashboard | The Dashboard that is saved. |
Returns
Type | Description |
---|---|
Dashboard | New or updated Dashboard |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
SaveDashboardTile(DashboardTile)
Updates the existing DashboardTile or creates a new DashboardTile if the id parameter is empty
Declaration
DashboardTile SaveDashboardTile(DashboardTile dashboardTile)
Parameters
Type | Name | Description |
---|---|---|
DashboardTile | dashboardTile | The DashboardTile that is saved. |
Returns
Type | Description |
---|---|
DashboardTile | New or updated DashboardTile |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}
SetTile(Int32, Int32, Int32)
Sets tile in the given dashboard position
Declaration
Dashboard SetTile(int dashboardId, int tileId, int position)
Parameters
Type | Name | Description |
---|---|---|
Int32 | dashboardId | Dashboard Id |
Int32 | tileId | Tile Id |
Int32 | position | Tile position in the dashboard |
Returns
Type | Description |
---|---|
Dashboard | The new dashboard is returned after the tile change |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (DashboardAgent agent = new DashboardAgent())
{
// call methods on agent here...
}
}