Class FindAgent
Facade for the Find Agent Find functions
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
public class FindAgent : AgentBase<IFindAgent>, IDisposable, IFindAgent, IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
Constructors
FindAgent()
Facade for the Find Agent Find functions
Declaration
public FindAgent()
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
Methods
CreateRestrictionGroup(String, String, String, String)
Create a restriction group, initialized with next rank etc.
Declaration
public ArchiveRestrictionGroup CreateRestrictionGroup(string storageType, string providerName, string storageKey, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
ArchiveRestrictionGroup | The new restriction group. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
DeleteRestrictionGroup(String, String, String, Int32, String)
Create a restriction group, initialized with next rank etc.
Declaration
public void DeleteRestrictionGroup(string storageType, string providerName, string storageKey, int rank, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
Int32 | rank | Rank of the group to be deleted. |
String | context | Optional context that can be used by FindProvider |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
Find(String, String, String, Int32, Int32)
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby columns are also calculated by the system.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
Declaration
public FindResults Find(string storageType, string providerName, string storageKey, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictions(ArchiveRestrictionInfo[], String, Int32, Int32)
Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
Declaration
public FindResults FindFromRestrictions(ArchiveRestrictionInfo[] restrictions, string providerName, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRestrictionInfo[] | restrictions | Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictions2(String, String, Int32, Int32)
Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
Declaration
public FindResults FindFromRestrictions2(string restrictions, string providerName, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | restrictions | String of restrictions specifying the search. e.g. "name='SuperOffice'" Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictionsColumns(ArchiveRestrictionInfo[], String, String[], Int32, Int32)
Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
Declaration
public FindResults FindFromRestrictionsColumns(ArchiveRestrictionInfo[] restrictions, string providerName, string[] desiredColumns, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRestrictionInfo[] | restrictions | Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String[] | desiredColumns | Array of column names desired for the result. Each name must match a column offered by the given archive provider. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictionsColumns2(String, String, String, Int32, Int32)
Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
Declaration
public FindResults FindFromRestrictionsColumns2(string restrictions, string providerName, string desiredColumns, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | restrictions | String of restrictions specifying the search. e.g.:"name begins 'Super'". Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | desiredColumns | Array of column names desired for the result. Each name must match a column offered by the given archive provider. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictionsColumnsOrderBy(ArchiveRestrictionInfo[], String, String[], ArchiveOrderByInfo[], Int32, Int32)
Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
Declaration
public FindResults FindFromRestrictionsColumnsOrderBy(ArchiveRestrictionInfo[] restrictions, string providerName, string[] desiredColumns, ArchiveOrderByInfo[] orderBy, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRestrictionInfo[] | restrictions | Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String[] | desiredColumns | Array of column names desired for the result. Each name must match a column offered by the given archive provider. |
ArchiveOrderByInfo[] | orderBy | Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindFromRestrictionsColumnsOrderBy2(String, String, String, String, Int32, Int32)
Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
Declaration
public FindResults FindFromRestrictionsColumnsOrderBy2(string restrictions, string providerName, string desiredColumns, string orderBy, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | restrictions | String of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true. |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | desiredColumns | Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider. |
String | orderBy | String of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindOrderBy(String, String, String, Int32, Int32, ArchiveOrderByInfo[])
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
Declaration
public FindResults FindOrderBy(string storageType, string providerName, string storageKey, int pageSize, int pageNumber, ArchiveOrderByInfo[] orderBy)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
ArchiveOrderByInfo[] | orderBy | Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindOrderBy2(String, String, String, Int32, Int32, String)
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
Declaration
public FindResults FindOrderBy2(string storageType, string providerName, string storageKey, int pageSize, int pageNumber, string orderBy)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
String | orderBy | Comma separated list of order by specifications. "name asc, dept desc" If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindWithColumns(String, String, String, String[], Int32, Int32, ArchiveOrderByInfo[])
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters.
Declaration
public FindResults FindWithColumns(string storageType, string providerName, string storageKey, string[] desiredColumns, int pageSize, int pageNumber, ArchiveOrderByInfo[] orderBy)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String[] | desiredColumns | Array of column names desired for the result. Each name must match a column offered by the given archive provider. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
ArchiveOrderByInfo[] | orderBy | Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindWithExtraRestrictions(String, String, String, ArchiveRestrictionInfo[], ArchiveOrderByInfo[], String[], Int32, Int32)
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
Declaration
public FindResults FindWithExtraRestrictions(string storageType, string providerName, string storageKey, ArchiveRestrictionInfo[] extraRestrictions, ArchiveOrderByInfo[] orderBy, string[] desiredColumns, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
ArchiveRestrictionInfo[] | extraRestrictions | Extra restrictions to append to the the search. These will override saved restrictions with the same key. |
ArchiveOrderByInfo[] | orderBy | Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
String[] | desiredColumns | Array of column names desired for the result. Each name must match a column offered by the given archive provider. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
FindWithExtraRestrictions2(String, String, String, String, String, String, Int32, Int32)
Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
Declaration
public FindResults FindWithExtraRestrictions2(string storageType, string providerName, string storageKey, string extraRestrictions, string orderBy, string desiredColumns, int pageSize, int pageNumber)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String | extraRestrictions | Extra restrictions to append to the the search. These will override saved restrictions with the same key. |
String | orderBy | Comma separated list of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query. |
String | desiredColumns | Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider. |
Int32 | pageSize | Size of result set pages |
Int32 | pageNumber | Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip. |
Returns
Type | Description |
---|---|
FindResults | Results from search, containing column information and result rows. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetAvailableRestrictionColumns(String, String)
Get a list of the column names corresponding to available restrictions for a certain archive provider and restriction storage provider. Such columns have CanRestrict set to true, and are supported by the given restriction storage provider.
Declaration
public string[] GetAvailableRestrictionColumns(string storageType, string providerName)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is to execute the search and return the result columns/rows |
Returns
Type | Description |
---|---|
String[] | Array of column names, corresponding to support restrictions for the given archive and restriction storage providers. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetCriteriaInformation(String, String, String, String[])
Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
Declaration
public CriteriaInformation GetCriteriaInformation(string storageType, string providerName, string storageKey, string[] staticColumns)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String[] | staticColumns | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetCriteriaInformationWithContext(String, String, String, String[], String)
Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
Declaration
public CriteriaInformation GetCriteriaInformationWithContext(string storageType, string providerName, string storageKey, string[] staticColumns, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String[] | staticColumns | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetDefaultDesiredColumns(String, String, String)
Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a storage type, provider name and storage key, which are used to fetch the corresponding restrictions from the database (in the same way as Find does). If you want to specify the restriction directly, use the GetDefaultDesiredColumnsFromRestrictions method instead. This is the algorithm that is used by the Find service method.
Declaration
public ArchiveColumnInfo[] GetDefaultDesiredColumns(string storageType, string providerName, string storageKey)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of the provider to calculate default desired columns for |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
Returns
Type | Description |
---|---|
ArchiveColumnInfo[] | Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetDefaultDesiredColumnsFromRestrictions(String, ArchiveRestrictionInfo[])
Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
Declaration
public ArchiveColumnInfo[] GetDefaultDesiredColumnsFromRestrictions(string providerName, ArchiveRestrictionInfo[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | Name of the provider to calculate default desired columns for |
ArchiveRestrictionInfo[] | restrictions | Restriction to use in the calculation of default desired columns |
Returns
Type | Description |
---|---|
ArchiveColumnInfo[] | Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetDefaultDesiredColumnsFromRestrictions2(String, String)
Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
Declaration
public ArchiveColumnInfo[] GetDefaultDesiredColumnsFromRestrictions2(string providerName, string restrictions)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | Name of the provider to calculate default desired columns for |
String | restrictions | Restriction to use in the calculation of default desired columns |
Returns
Type | Description |
---|---|
ArchiveColumnInfo[] | Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetDefaultOrderBy(String, String, String)
Calculate the default orderby columns for a given provider and a search. The search is specified by a storage type, provider name and storage key, and is fetched from the database. Default desired columns are then calculated for the search, and those columns are then used as the basis for calculating an order by. If you want to specify the desired columns directly, use the GetDefaultOrderByFromDesiredColumns method instead. This is the same algorithm that is used by the Find service method.
Declaration
public ArchiveOrderByInfo[] GetDefaultOrderBy(string storageType, string providerName, string storageKey)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Provider name to calculate default orderby for |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
Returns
Type | Description |
---|---|
ArchiveOrderByInfo[] | Orderby information |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetDefaultOrderByFromDesiredColumns(String, String[])
Calculate the default orderby columns for a given provider and a set of desired columns. This is the same algorithm that is used by the Find service method.
Declaration
public ArchiveOrderByInfo[] GetDefaultOrderByFromDesiredColumns(string providerName, string[] desiredColumns)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | Provider name to calculate default orderby for |
String[] | desiredColumns | Desired columns (return fields), used in the orderby calculation. You can generally only order by columns that have been set as 'desired'. |
Returns
Type | Description |
---|---|
ArchiveOrderByInfo[] | Orderby information |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetRestrictionGroup(String, String, String, Int32, String)
Return the restriction group with given rank or a blank carrier.
Declaration
public ArchiveRestrictionGroup GetRestrictionGroup(string storageType, string providerName, string storageKey, int rank, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
Int32 | rank | Rank of the group to be deleted. |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
ArchiveRestrictionGroup | The new restriction group. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetRestrictionGroups(String, String, String, String)
Return all the restriction groups.
Declaration
public ArchiveRestrictionGroup[] GetRestrictionGroups(string storageType, string providerName, string storageKey, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
ArchiveRestrictionGroup[] | The restriction groups. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetSpecifiedCriteriaInformationWithDefaults(String, String, String, String[], String[])
Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
Declaration
public CriteriaInformation GetSpecifiedCriteriaInformationWithDefaults(string storageType, string providerName, string storageKey, string[] desiredColumnNames, string[] staticColumns)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String[] | desiredColumnNames | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
String[] | staticColumns | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
GetSpecifiedCriteriaInformationWithDefaultsWithContext(String, String, String, String[], String[], String)
Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
Declaration
public CriteriaInformation GetSpecifiedCriteriaInformationWithDefaultsWithContext(string storageType, string providerName, string storageKey, string[] desiredColumnNames, string[] staticColumns, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search |
String[] | desiredColumnNames | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
String[] | staticColumns | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
PopulateRestrictions(String, ArchiveRestrictionInfo[])
Take an incoming set of minimally populated restrictions (name + operator is required), and populate all the other parts of the ArchiveRestrictionInfo structure. This includes column information, display values (including list value lookup), and calculated/default values where the value hints specify read-only (R).
Declaration
public ArchiveRestrictionInfo[] PopulateRestrictions(string providerName, ArchiveRestrictionInfo[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
String | providerName | Provider name to use for populating column information |
ArchiveRestrictionInfo[] | restrictions | Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null. If a ColumnInfo is already set, it will not be overwritten. |
Returns
Type | Description |
---|---|
ArchiveRestrictionInfo[] | Fully populated restrictions in the same order as the incoming restrictions. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
PopulateRestrictionValues(ArchiveRestrictionInfo[])
Take an incoming set of Restrictions (name + operator + any user-entered values), and populate/expand all values as specified by the operator's ValueHints, taking into account any values already there. Used for dynamic date periods; perhaps others in the future
Declaration
public ArchiveRestrictionInfo[] PopulateRestrictionValues(ArchiveRestrictionInfo[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRestrictionInfo[] | restrictions | Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null and will not be changed. |
Returns
Type | Description |
---|---|
ArchiveRestrictionInfo[] | Restrictions in the same order as the incoming restrictions, with all values expanded. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionGroup(String, String, String, ArchiveRestrictionGroup, String)
Save an array of restrictions as a restriction group for later use as search criteria (including as dynamic selection and Find).
Declaration
public void SaveRestrictionGroup(string storageType, string providerName, string storageKey, ArchiveRestrictionGroup restrictionGroup, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
ArchiveRestrictionGroup | restrictionGroup | Information about a group of restrictions |
String | context | Optional context that can be used by FindProvider |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionGroups(String, String, String, ArchiveRestrictionGroup[], String)
Save and rerank an array of restriction groups, returning the possibly modified array.
Declaration
public ArchiveRestrictionGroup[] SaveRestrictionGroups(string storageType, string providerName, string storageKey, ArchiveRestrictionGroup[] restrictionGroups, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
ArchiveRestrictionGroup[] | restrictionGroups | Information about a group of restrictions |
String | context | Optional context that can be used by FindProvider |
Returns
Type | Description |
---|---|
ArchiveRestrictionGroup[] | The new restriction group. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictions(String, String, String, ArchiveRestrictionInfo[])
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
Declaration
public void SaveRestrictions(string storageType, string providerName, string storageKey, ArchiveRestrictionInfo[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
ArchiveRestrictionInfo[] | restrictions | Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictions2(String, String, String, String)
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
Declaration
public void SaveRestrictions2(string storageType, string providerName, string storageKey, string restrictions)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
String | restrictions | String of restrictions. "name = 'SuperOffice'" The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionsAndGetCriteriaInformation(String, String, String, ArchiveRestrictionInfo[], String[])
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
Declaration
public CriteriaInformation SaveRestrictionsAndGetCriteriaInformation(string storageType, string providerName, string storageKey, ArchiveRestrictionInfo[] restrictions, string[] staticColumns)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
ArchiveRestrictionInfo[] | restrictions | Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
String[] | staticColumns | Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionsAndGetCriteriaInformation2(String, String, String, String, String)
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
Declaration
public CriteriaInformation SaveRestrictionsAndGetCriteriaInformation2(string storageType, string providerName, string storageKey, string restrictions, string staticColumns)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
String | restrictions | String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
String | staticColumns | Optional string of comma-separated columns that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list. |
Returns
Type | Description |
---|---|
CriteriaInformation | The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionsWithContext(String, String, String, ArchiveRestrictionInfo[], String)
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
Declaration
public void SaveRestrictionsWithContext(string storageType, string providerName, string storageKey, ArchiveRestrictionInfo[] restrictions, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
ArchiveRestrictionInfo[] | restrictions | Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
String | context | Optional context that can be used by FindProvider |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}
SaveRestrictionsWithContext2(String, String, String, String, String)
Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
Declaration
public void SaveRestrictionsWithContext2(string storageType, string providerName, string storageKey, string restrictions, string context)
Parameters
Type | Name | Description |
---|---|---|
String | storageType | Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions) |
String | providerName | Name of archive provider that is the intended consumer of the restrictions |
String | storageKey | Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria |
String | restrictions | String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures. |
String | context | Optional context that can be used by FindProvider |
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (FindAgent agent = new FindAgent())
{
// call methods on agent here...
}
}