Interface IMDOAgent
Interface for the MDO Agent MDO Lists, reading, searching, and item lookup.
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("MDO Agent", "Interface for the MDO Agent. MDO Lists, reading, searching, and item lookup.")]
public interface IMDOAgent : IAgent
Examples
using SuperOffice;
using SuperOffice.CRM.Services;
using (SoSession mySession = SoSession.Authenticate("user", "pass"))
{
using (MDOAgent agent = new MDOAgent())
{
// call methods on agent here...
}
}
Methods
GetListAsync(string, bool, string, bool, CancellationToken)
Method to get a MDO list.
Declaration
Task<MDOListItem[]> GetListAsync(string name, bool forceFlatList, string additionalInfo, bool onlyHistory, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list- |
bool | forceFlatList | Force the list to be flat |
string | additionalInfo | Additional info to the MDO provider |
bool | onlyHistory | If true, return only history items |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<MDOListItem[]> | Array of MDOListItem |
GetListIdByListNameAsync(string, CancellationToken)
Retrieve the UdListDefinition id of a list, by its name. Not all lists have such an ID, but those that are based on tables do (the list name is then the same as the table name)
Declaration
Task<int> GetListIdByListNameAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | The list name, same as the table name for lists that are backed by tables |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<int> | List id in the UdListDefinition table |
GetListItemAsync(string, int, CancellationToken)
Returns a single list item
Declaration
Task<MDOListItem> GetListItemAsync(string listName, int id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | listName | Conceptual name of the MDO list |
int | id | Id of list item |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<MDOListItem> | Single MDO list item |
GetListNamesAsync(CancellationToken)
Returns a list of all MDO List names. These names can also be used with the Archive agent as ProviderNames.
Declaration
Task<string[]> GetListNamesAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<string[]> | Array of list names. |
GetListWithHistoryAsync(string, bool, string, int[], bool, CancellationToken)
Method to get a MDO list with own history list.
Declaration
Task<MDOListItem[]> GetListWithHistoryAsync(string name, bool forceFlatList, string additionalInfo, int[] historyItems, bool onlyHistory, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list- |
bool | forceFlatList | Force the list to be flat |
string | additionalInfo | Additional info to the MDO provider |
int[] | historyItems | An array of ids, used to get the history list |
bool | onlyHistory | If true, return only history items |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<MDOListItem[]> | Array of MDOListItem |
GetListWithRestrictionAsync(string, string, string, CancellationToken)
Method to get a MDO list with restrictions.
Declaration
Task<MDOListItem[]> GetListWithRestrictionAsync(string name, string additionalInfo, string searchValue, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list- |
string | additionalInfo | Additional info to the MDO provider |
string | searchValue | the value used to restrict the list |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<MDOListItem[]> | Array of MDOListItem |
GetSelectableListAsync(string, bool, string, bool, CancellationToken)
Method to get a Selectable MDO list.
Declaration
Task<SelectableMDOListItem[]> GetSelectableListAsync(string name, bool forceFlatList, string additionalInfo, bool onlyHistory, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list. |
bool | forceFlatList | Force the list to be flat |
string | additionalInfo | Additional info to the MDO provider |
bool | onlyHistory | If true, return only history items |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SelectableMDOListItem[]> | Array of SelectableMDOListItem |
GetSelectableListWithHistoryAsync(string, bool, string, int[], bool, CancellationToken)
Method to get a Selectable MDO list with own history list.
Declaration
Task<SelectableMDOListItem[]> GetSelectableListWithHistoryAsync(string name, bool forceFlatList, string additionalInfo, int[] historyItems, bool onlyHistory, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list. |
bool | forceFlatList | Force the list to be flat |
string | additionalInfo | Additional info to the MDO provider |
int[] | historyItems | An array of ids, used to get the history list |
bool | onlyHistory | If true, return only history items |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SelectableMDOListItem[]> | Array of SelectableMDOListItem |
GetSelectableListWithRestrictionAsync(string, string, string, CancellationToken)
Method to get a Selectable MDO list with restrictions.
Declaration
Task<SelectableMDOListItem[]> GetSelectableListWithRestrictionAsync(string name, string additionalInfo, string searchValue, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list |
string | additionalInfo | Additional info to the MDO provider |
string | searchValue | the value used to restrict the list |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SelectableMDOListItem[]> | Array of SelectableMDOListItem |
GetSelectableSimpleListAsync(string, CancellationToken)
Method returns a flat Selectable MDO List.
Declaration
Task<SelectableMDOListItem[]> GetSelectableSimpleListAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SelectableMDOListItem[]> | Array of SelectableMDOListItem |
GetSimpleListAsync(string, CancellationToken)
Method returns a simple flat MDO List.
Declaration
Task<MDOListItem[]> GetSimpleListAsync(string name, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<MDOListItem[]> | Array of MDOListItem |
SetSelectedAsync(string, string, SelectableMDOListItem[], CancellationToken)
Saves the selected values as selected by their given list representation.
Declaration
Task<SelectableMDOListItem[]> SetSelectedAsync(string name, string additionalInfo, SelectableMDOListItem[] selectableMDOList, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | name | Conceptual name of the MDO list |
string | additionalInfo | Additional info to the MDO provider |
SelectableMDOListItem[] | selectableMDOList | Items to be updated |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<SelectableMDOListItem[]> | Array of updated SelectableMDOListItems |