Class ArchiveAgent
Facade for the Archive Agent ArchiveList functions of all kinds
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class ArchiveAgent : AgentBase<IArchiveAgent>, IDisposable, IArchiveAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
Constructors
ArchiveAgent()
Facade for the Archive Agent ArchiveList functions of all kinds
Declaration
public ArchiveAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
Methods
CreateDefaultArchiveListResult()
Loading default values into a new ArchiveListResult. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance
Declaration
public ArchiveListResult CreateDefaultArchiveListResult()
Returns
Type | Description |
---|---|
ArchiveListResult | New ArchiveListResult with default values |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
ExportArchive(String, String, String[], String[], ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String, String[], Int32)
Exports the target archive to a downloadable format.
Declaration
public ExportArchiveResult ExportArchive(string providerName, string context, string[] desiredEntities, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restrictions, string exportType, string[] selectedRowIds, int estimatedRowCount)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
String[] | desiredEntities | Comma separated list of the names of the desired entities. |
String[] | columns | Comma separated list of the names of the columns wanted; supports display names |
ArchiveOrderByInfo[] | sortOrder | |
ArchiveRestrictionInfo[] | restrictions | |
String | exportType | To what format the archive should be exported; Excel, etc. |
String[] | selectedRowIds | |
Int32 | estimatedRowCount | The estimated amount of rows to be exported. Used to determine if the operation should be run as a batch task or immediately. |
Returns
Type | Description |
---|---|
ExportArchiveResult |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetActivityFilter()
Get activity filter for the specified list.
Declaration
public ActivityFilter GetActivityFilter()
Returns
Type | Description |
---|---|
ActivityFilter | The activity filter for the specified list |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveConfiguration(String, String)
Get the configuration for one archive. The configuration is keyed by a combination of archive provider name and gui name. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.
Declaration
public ArchiveConfiguration GetArchiveConfiguration(string guiName, string providerName)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
Returns
Type | Description |
---|---|
ArchiveConfiguration | Archive configuration consisting of column information, orderby information and entities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveConfigurationV2(String, String, String, String)
Get the configuration for one archive. The configuration is keyed by a combination of archive provider name (plus optional context), gui name, and optional table binding. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.
Declaration
public ArchiveConfiguration GetArchiveConfigurationV2(string guiName, string providerName, string context, string ownerKeys)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful |
String | ownerKeys | Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys |
Returns
Type | Description |
---|---|
ArchiveConfiguration | Archive configuration consisting of column information, orderby information and entities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveConfigurationWithContext(String, String, String)
Get the configuration for one archive, with context parameter. The configuration is keyed by a combination of archive provider name and gui name. The archive provider name must match an archive provider plugin; the gui name is an arbitrary string used to distinguish multiple occurrences of the same underlying provider in a gui.
Declaration
public ArchiveConfiguration GetArchiveConfigurationWithContext(string guiName, string providerName, string context)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveConfiguration | Archive configuration consisting of column information, orderby information and entities |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveList(String, String, ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32)
Get a page of data for an archive. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.
Declaration
public ArchiveListItem[] GetArchiveList(string guiName, string providerName, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service) |
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveList2(String, String, String, String, String, Int32, Int32)
Get a page of data for an archive using a restriction string. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.
Declaration
public ArchiveListItem[] GetArchiveList2(string guiName, string providerName, string sortOrder, string restriction, string entities, int page, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service) |
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
String | restriction | Archive restrictions as string. e.g. "name = 'baz' or category oneOf (1,2,3)". Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumns(String, String[], ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32)
Get a page of results for an archive list, explicitly specifying the restrictions, orderby and chosen columns.
Declaration
public ArchiveListItem[] GetArchiveListByColumns(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String[] | columns | An array of the names of the columns wanted. |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumns2(String, String, String, String, String, Int32, Int32)
Get a page of results for an archive list, explicitly specifying the restrictions as a string, orderby and chosen columns.
Declaration
public ArchiveListItem[] GetArchiveListByColumns2(string providerName, string columns, string sortOrder, string restrictions, string entities, int page, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | columns | An array of the names of the columns wanted. |
String | sortOrder | Sort order for the archive as string ('name asc, dept desc'). Can be null, which indicates 'no particular order' |
String | restrictions | Archive restrictions as string ('category = 1 and business oneOf (1,2,3)'). Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithContext(String, String[], ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32, String)
Get a page of results for an archive list with context parameter, explicitly specifying the restrictions, orderby and chosen columns.
Declaration
public ArchiveListItem[] GetArchiveListByColumnsWithContext(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String[] | columns | An array of the names of the columns wanted. |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithContext2(String, String, String, String, String, Int32, Int32, String)
Get a page of results for an archive list with context parameter, explicitly specifying the restrictions as a string, orderby and chosen columns.
Declaration
public ArchiveListItem[] GetArchiveListByColumnsWithContext2(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | columns | Comma separated names of the columns wanted. |
String | sortOrder | Comma separated list of columns to sort order for the archive. e.g.: "name asc, dept desc, registeredBy" Can be null, which indicates 'no particular order' |
String | restriction | Archive restrictions as string. e.g. "name startsWith 'foo' and (dept = 'bar' or dept = 'baz')" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithHeader(String, String[], ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32, String)
Get a page of results for an archive list, explicitly specifying the restrictions, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.
Declaration
public ArchiveListResult GetArchiveListByColumnsWithHeader(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string options)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String[] | columns | An array of the names of the columns wanted. |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | options | name=value&... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated. |
Returns
Type | Description |
---|---|
ArchiveListResult | Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithHeader2(String, String, String, String, String, Int32, Int32, String)
Get a page of results for an archive list, explicitly specifying the restrictions as strings, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.
Declaration
public ArchiveListResult GetArchiveListByColumnsWithHeader2(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string options)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | columns | Comma separated string of the names of the columns wanted. |
String | sortOrder | Comma separated string of sort order for the archive. e.g. "name asc, dept desc" Can be null, which indicates 'no particular order' |
String | restriction | Archive restrictions. e.g. "category = 2 or business oneOf (2,3,4)" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | options | name=value&... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated. |
Returns
Type | Description |
---|---|
ArchiveListResult | Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithHeaderWithContext(String, String[], ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32, String, String)
Get a page of results for an archive list, with context parameter, explicitly specifying the restrictions, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.
Declaration
public ArchiveListResult GetArchiveListByColumnsWithHeaderWithContext(string providerName, string[] columns, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string options, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String[] | columns | An array of the names of the columns wanted. |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | options | name=value&... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListResult | Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListByColumnsWithHeaderWithContext2(String, String, String, String, String, Int32, Int32, String, String)
Get a page of results for an archive list, with context parameter, explicitly specifying the restrictions as strings, orderby and chosen columns; as well as a name/value string formatted set of options. The return value includes a header that has various extra information, in addition to the actual rows.
Declaration
public ArchiveListResult GetArchiveListByColumnsWithHeaderWithContext2(string providerName, string columns, string sortOrder, string restriction, string entities, int page, int pageSize, string options, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | columns | Comma separated list of the names of the columns wanted. |
String | sortOrder | Sort order for the archive. "name asc, dept desc" Can be null, which indicates 'no particular order' |
String | restriction | Archive restrictions as string. "updated > '2009.1.1' and registeredBy = 2" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | options | name=value&... formatted set of options. "rowcount=true" will cause the rowcount to be calculated and populated. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListResult | Header with optional row count, plus array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListWithContext(String, String, ArchiveOrderByInfo[], ArchiveRestrictionInfo[], String[], Int32, Int32, String)
Get a page of data for an archive, with context parameter. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.
Declaration
public ArchiveListItem[] GetArchiveListWithContext(string guiName, string providerName, ArchiveOrderByInfo[] sortOrder, ArchiveRestrictionInfo[] restriction, string[] entities, int page, int pageSize, string context)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service) |
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
ArchiveOrderByInfo[] | sortOrder | Sort order for the archive. Can be null, which indicates 'no particular order' |
ArchiveRestrictionInfo[] | restriction | Archive restrictions. Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String[] | entities | Which entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetArchiveListWithContext2(String, String, String, String, String, Int32, Int32, String)
Get a page of data for an archive using restrictions as strings, with context parameter. The columns returned will be those set as chosen columns, using either the SetChosenColumns service or the corresponding SelectableMDOList.SetSelected.
Declaration
public ArchiveListItem[] GetArchiveListWithContext2(string guiName, string providerName, string sortOrder, string restriction, string entities, int page, int pageSize, string context)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | The GUI name of the archive list, used to retrieve the currently configured set of columns (otherwise manipulated using the ArchiveConfiguration service) |
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | sortOrder | Sort order for the archive. e.g. "name asc, dept desc" Can be null, which indicates 'no particular order' |
String | restriction | Archive restrictions as string. e.g. "name gt 'B' or dept = 'baz'" Archives will generally throw an exception if no restrictions are set. Pass in an empty array if you really do not want restrictions, but remember that you may end up fetching the first page of millions of rows. |
String | entities | Comma separated list of entities to include. Can be null, which indicates 'include all entities' |
Int32 | page | Page number, page 0 is the first page. Negative page numbers are interpreted as number of rows to skip. |
Int32 | pageSize | Page size, which should be kept reasonable (say, no more than 1000 rows at a time) |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveListItem[] | Array of archive list items, where each item represents one row of data (row level data + the requested columns) |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetAvailableColumns(String, String)
Return list of all columns supported by an archive provider. See also GetArchiveConfiguration.
Declaration
public ArchiveColumnInfo[] GetAvailableColumns(string providerName, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | context | Optional context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
ArchiveColumnInfo[] | Array of all columns supported by the archive provider. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetAvailableEntities(String, String)
Return list of all entities supported by an archive provider. See also GetArchiveConfiguration.
Declaration
public MDOListItem[] GetAvailableEntities(string providerName, string context)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | The name of the archive provider to use; it will be created via the ArchiveProviderFactory from a plugin |
String | context | Optional context parameter, url-encoded string context parameter for ArchiveProvider constructor |
Returns
Type | Description |
---|---|
MDOListItem[] | Array of all entity types supported by the archive provider. MDOListItem.Name = DisplayName, Tooltip = DisplayTooltip, Type = code name, StyleHint = optional/mandatory, IconHint=DefaultShow |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetGroupAssociateIds(Int32[])
Returns the associate ids that belongs to the given groups
Declaration
public int[] GetGroupAssociateIds(int[] groupIds)
Parameters
Type | Name | Description |
---|---|---|
Int32[] | groupIds | Array of group ids |
Returns
Type | Description |
---|---|
Int32[] | Array of associate ids |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetProviderNames()
Return list of all archive provider names
Declaration
public string[] GetProviderNames()
Returns
Type | Description |
---|---|
String[] | Array of all archive provider names. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetRelatedData(String, Int32, String[])
Get data for fields related to a table record. While this method /can/ be used to fetch plain fields, that is not the intended usage and it does not replace the Entity.Get methods available for that purpose. Nor does it replace the generic DotSyntax/Dynamic archive provider.
Declaration
public RelatedData[] GetRelatedData(string table, int recordId, string[] fields)
Parameters
Type | Name | Description |
---|---|---|
String | table | The root table to get related data for, such as 'ticket' or 'y_car' |
Int32 | recordId | The primary key of the root table to get related data for |
String[] | fields | Names of fields - these need to be valid in the DotSyntax for this table, and can be arbitrarily deep. Examples: 'title', 'created_by.associate_id.person.fullName', 'x_comment'. Do not start with the root table name. |
Returns
Type | Description |
---|---|
RelatedData[] | Array of field => ArchiveColumnData objects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
GetRelatedData2(String, Int32, String)
Get data for fields related to a table record. While this method /can/ be used to fetch plain fields, that is not the intended usage and it does not replace the Entity.Get methods available for that purpose. Nor does it replace the generic DotSyntax/Dynamic archive provider.
Declaration
public RelatedData[] GetRelatedData2(string table, int recordId, string fields)
Parameters
Type | Name | Description |
---|---|---|
String | table | The root table to get related data for, such as 'ticket' or 'y_car' |
Int32 | recordId | The primary key of the root table to get related data for |
String | fields | Names of fields as a comma-separated list - these need to be valid in the DotSyntax for this table, and can be arbitrarily deep. Example: 'title,created_by.associate_id.person.fullName, x_comment'. Do not start with the root table name. |
Returns
Type | Description |
---|---|
RelatedData[] | Array of field => ArchiveColumnData objects |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetActivityFilter(ActivityFilter)
Set activity filter for the specified list.
Declaration
public void SetActivityFilter(ActivityFilter activityFilter)
Parameters
Type | Name | Description |
---|---|---|
ActivityFilter | activityFilter | New activity filter |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetChosenColumns(String, String, String[])
Set the currently chosen columns for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveColumns: plus the archive provider name and gui name as its additionalInfo.
Declaration
public void SetChosenColumns(string guiName, string providerName, string[] chosenColumns)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String[] | chosenColumns | Array of column names, where array order indicates left to right order in the archive. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetChosenColumnsV2(String, String, String, String, String[])
Set the currently chosen columns for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveColumns: plus the archive provider name and gui name as its additionalInfo.
Declaration
public void SetChosenColumnsV2(string guiName, string providerName, string context, string ownerKeys, string[] chosenColumns)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful |
String | ownerKeys | Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys |
String[] | chosenColumns | Array of column names, where array order indicates left to right order in the archive. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetChosenEntities(String, String, String[])
Set the currently chosen entities for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveEntities: plus the archive provider name and gui name as its additionalInfo.
Declaration
public void SetChosenEntities(string guiName, string providerName, string[] entities)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String[] | entities | Array of entity names |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetChosenEntitiesV2(String, String, String, String, String[])
Set the currently chosen entities for the given gui name/provider name combination. This service corresponds to the SetSelected method of the SelectableMDOList service, for a list called archiveEntities: plus the archive provider name and gui name as its additionalInfo.
Declaration
public void SetChosenEntitiesV2(string guiName, string providerName, string context, string ownerKeys, string[] entities)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful |
String | ownerKeys | Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys |
String[] | entities | Array of entity names |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetColumnWidths(String, String[])
Set the column widths for the given set of columns and GUI name.
Declaration
public void SetColumnWidths(string guiName, string[] columnWidths)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String[] | columnWidths | Array of column widths. A column width is specified either as a fixed number of character (10c) or as a percentage (10%). Percentages will be recalculated so that they add up to exactly 100 when the configuration is fetched again. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}
SetColumnWidthsV2(String, String, String, String, String[])
Set the column widths for the given set of columns and GUI name.
Declaration
public void SetColumnWidthsV2(string guiName, string providerName, string context, string ownerKeys, string[] columnWidths)
Parameters
Type | Name | Description |
---|---|---|
String | guiName | String that identifies the archive in the GUI, must be the same when fetching and storing configurations, but does not otherwise have to match anything. |
String | providerName | Name of archive provider, must match one of the plugins known to the ArchiveProviderFactory. |
String | context | Context parameter, url-encoded string context parameter for ArchiveProvider constructor. Optional, but required for archives that depend on a context - for instance Quote archives that need to know their QuoteConnectionId to be meaningful |
String | ownerKeys | Name/value string containing ownership binding information. The first should resolve to a table/primarykey, such as selection=123. Future functionality may allow multiple/extended keys |
String[] | columnWidths | Array of column widths. A column width is specified either as a fixed number of character (10c) or as a percentage (10%). Percentages will be recalculated so that they add up to exactly 100 when the configuration is fetched again. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (ArchiveAgent agent = new ArchiveAgent())
{
// call methods on agent here...
}
}