<a id=“SuperOffice_WebApi_Agents_SelectionAgent”></a> Class SelectionAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Selections, entities, members and tasks
Inheritance
object ← AgentBase ← SelectionAgentImplements
ISelectionAgent, IAgentBase, IDisposableInherited Members
AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T>(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Examples
<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (SelectionAgent agent = new SelectionAgent(mySession)) { // call methods on agent here… }</code></pre>Constructors
<a id=“SuperOffice_WebApi_Agents_SelectionAgent__ctor_System_Net_Http_HttpClient_”></a> SelectionAgent(HttpClient)
Constructor: Selections, entities, members and tasksParameters
httpClient HttpClient
Use this HTTP client instead of making own HttpClient instance.
<a id=“SuperOffice_WebApi_Agents_SelectionAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> SelectionAgent(WebApiOptions, HttpClient)
Constructor: Selections, entities, members and tasksParameters
options WebApiOptions
Base URL and authentication values.
httpClient HttpClient
Optional: Use this HTTP client instead of making a new one.
Methods
<a id=“SuperOffice_WebApi_Agents_SelectionAgent_AddContactSelectionMembersAsync_System_Int32_SuperOffice_WebApi_Data_ContactPersonId___SuperOffice_WebApi_RequestOptions_”></a> AddContactSelectionMembersAsync(int, ContactPersonId[], RequestOptions)
Adds the collection of ContactPersonId as members to the static selectionParameters
selectionId int
The id of the selection where to members will be added to.
contactPersonIds ContactPersonId[]
A collection of ContactPersonId to add to the selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_AddContactSelectionMembersFromSearchAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddContactSelectionMembersFromSearchAsync(int, string, RequestOptions)
Adds members to the selection from the search result.Parameters
selectionId int
The id of the selection to add members
storageKey string
Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Number of members added<a id=“SuperOffice_WebApi_Agents_SelectionAgent_AddRemoveContactSelectionMemberInterestsAsync_System_Int32_System_Int32___System_Int32___System_Int32___System_Int32___SuperOffice_WebApi_RequestOptions_”></a> AddRemoveContactSelectionMemberInterestsAsync(int, int[], int[], int[], int[], RequestOptions)
Adds or removes interests on companies and persons in a selection.Parameters
selectionId int
The id of the selection to add or remove interests members from.
addCompanyInterests int[]
Array of int containing the id’s of the interests to add to the company.
removeCompanyInterests int[]
Array of int containing the id’s of the interests to remove from the company.
addContactInterests int[]
Array of int containing the id’s of the interests to add to the contact.
removeContactInterests int[]
Array of int containing the id’s of the interests to remove from the contact.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_AddSelectionMembersAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> AddSelectionMembersAsync(int, int[], RequestOptions)
Add selection members to a static selection of type others than contacts.Parameters
selectionId int
The selection id to add the members to.
ids int[]
Collection of ids to add to the selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Returns number of members added to the selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_AddSelectionMembersFromSearchAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> AddSelectionMembersFromSearchAsync(int, string, RequestOptions)
Adds members from the selection using the search result.Parameters
selectionId int
The id of the selection to add members
storageKey string
Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Number of members added.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CopyContactSelectionMembersAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CopyContactSelectionMembersAsync(int, int, RequestOptions)
Copy contact selection members from selection into an existing selection.Parameters
fromSelectionId int
The id of the selection to copy members from.
toSelectionId int
The id of the selection to copy members to.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CopySelectionMembersAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CopySelectionMembersAsync(int, int, RequestOptions)
Copy selection members from selection into an existing selection.Parameters
fromSelectionId int
The id of the selection to copy members from.
toSelectionId int
The id of the selection to copy members to.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateContactSelectionFromSelectionAsync_System_Int32_System_String_SuperOffice_WebApi_Data_SelectionType_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> CreateContactSelectionFromSelectionAsync(int, string, SelectionType, bool, RequestOptions)
Creates a new selection based on selection members from an existing selection.Parameters
selectionId int
The id of the selection to copy members from.
name string
The name of the new selection.
targetSelectionType SelectionType
The type of ContactSelection to create. The type can be static or dynamic. If the original selection to copy from is static, the SelectionType can only be static. If the original selection is dynamic, both a static and dynamic selection can be created.
copyMembers bool
If true, the members from the original selection will be added to the newly created selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateContactSelectionFromShadowSelectionAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateContactSelectionFromShadowSelectionAsync(int, string, RequestOptions)
Creates a new contact selection based on contact selection members from an existing shadow sale, appointment, project or document selection. The new selection will always be static even if the original selection is dynamic.Parameters
selectionId int
The id of the selection to copy members from.
name string
The name of the new selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateDefaultBoardViewSettingsFromEntityTypeAsync_SuperOffice_WebApi_Data_BoardViewEntityType_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultBoardViewSettingsFromEntityTypeAsync(BoardViewEntityType, RequestOptions)
Creates a new carrier from the entity type given, with the right kind of properties, defaults set.Parameters
entityType BoardViewEntityType
Entity type to create settings for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BoardViewSettingsBase><a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateDefaultSelectionEntityAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultSelectionEntityAsync(RequestOptions)
Set default values into a new SelectionEntity. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> A blank SelectionEntity<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateNewEntryAsync_SuperOffice_WebApi_Data_DuplicateEntry_SuperOffice_WebApi_RequestOptions_”></a> CreateNewEntryAsync(DuplicateEntry, RequestOptions)
Creates a new selection based on external duplicateParameters
duplicate DuplicateEntry
The duplicate to create a new entry based upon
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> The database identity of the newly created entry<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateSelectionEntityAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateSelectionEntityAsync(string, RequestOptions)
Create (but do not save) a new selection entity, for the current user and the given target table; other fields populated as by CreateDefaultSelectionEntity()Parameters
targetTableName string
The name of the target table, such as ‘contact’ or ‘appointment’; any table for which Selection functionality is enabled
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> The new SelectionEntity, which has not yet been saved<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateSelectionFromSelectionAsync_System_Int32_System_String_SuperOffice_WebApi_Data_SelectionType_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> CreateSelectionFromSelectionAsync(int, string, SelectionType, bool, RequestOptions)
Creates a new selection based on selection members from an existing selection.Parameters
selectionId int
The id of the selection to copy members from.
name string
The name of the new selection.
targetSelectionType SelectionType
The type of Selection to create. The type can be static or dynamic. If the original selection to copy from is static, the SelectionType can only be static. If the original selection is dynamic, both a static and dynamic selection can be created.
copyMembers bool
If true, the members from the original selection will be added to the newly created selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateTemporaryContactSelectionAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateTemporaryContactSelectionAsync(RequestOptions)
Creates a temporary selection.Parameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateTemporaryContactSelectionFromContactPersonIdsAsync_SuperOffice_WebApi_Data_ContactPersonId___SuperOffice_WebApi_RequestOptions_”></a> CreateTemporaryContactSelectionFromContactPersonIdsAsync(ContactPersonId[], RequestOptions)
Creates a temporary selection with members from a collection of ContactPerson id’s.Parameters
contactPersonIds ContactPersonId[]
A collection of ContactPersonId to copy into the temporary contact selection as members.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateTemporaryContactSelectionFromSelectionMemberIdsAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> CreateTemporaryContactSelectionFromSelectionMemberIdsAsync(int, int[], RequestOptions)
Creates a temporary selection with members from a collection of selectionmember id’s.Parameters
selectionId int
The selectionId the selectionmembers is a part of.
selectionMemberIds int[]
A collection of int ids to copy into the temporary contact selection as members.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_CreateTemporarySelectionFromIdsAsync_System_Int32___System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CreateTemporarySelectionFromIdsAsync(int[], int, RequestOptions)
Creates a temporary selection with members from a collection of entity id’s.Parameters
ids int[]
A collection of Ids to copy into the temporary selection as members. The ids are primary keys of entities defined by the targetTableNumber parameter.
targetTableNumber int
The type of selection to create.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> Returns the newly created SelectionEntity.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_DeleteBoardViewSettingsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteBoardViewSettingsAsync(int, RequestOptions)
Delete BoardViewSettingsParameters
boardViewSettingsId int
Primary key of BoardViewSettings
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_SelectionAgent_DeleteContactsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteContactsAsync(int, RequestOptions)
Deletes all contacts from a selection. If a contact does not have delete rights, it will be skipped.Parameters
selectionId int
Id of the selection the delete operation will be performed.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_DeleteEntitiesAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteEntitiesAsync(int, RequestOptions)
Deletes all entities from a selection. If an entity does not have delete rights, it will be skipped.Parameters
selectionId int
Id of the selection the delete operation will be performed.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_DeletePersonsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeletePersonsAsync(int, RequestOptions)
Deletes all persons from a selection. If a person does not have delete rights, it will be skipped.Parameters
selectionId int
Id of the selection the delete operation will be performed.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_DeleteSelectionEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteSelectionEntityAsync(int, RequestOptions)
Deletes the SelectionEntityParameters
selectionEntityId int
The identity of the SelectionEntity
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task This method has no return value<a id=“SuperOffice_WebApi_Agents_SelectionAgent_EditContactSelectionMemberDetailsAsync_System_Int32_SuperOffice_WebApi_Data_SelectionMemberEditValues_SuperOffice_WebApi_RequestOptions_”></a> EditContactSelectionMemberDetailsAsync(int, SelectionMemberEditValues, RequestOptions)
Edit company and contact details in a selection based on contents in selectionMemberEditValues.Parameters
selectionId int
The id of the selection to edit members from.
selectionMemberEditValues SelectionMemberEditValues
An object of <see cref=“SelectionMemberEditValues”/> describing what should be changed for companys and contacts.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_ExportSelectionMembersAsync_System_Int32_System_String_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> ExportSelectionMembersAsync(int, string, bool, RequestOptions)
ExportSelectionMembers will generate a string that is the result of substituting the template variables with values from selectionmembers.Parameters
selectionId int
The id of the selection to generate the exported file.
templateName string
The templateName parameter is the relative path of a .sxf file template. The .sxf files can be found in \template or in the user folder of the so archive.
useContacts bool
If the selection contains other members than contacts, setting this to true will export the contact archive of the selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<byte[]> Returns a unicode byte array with the file to export to the user.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_ExportSelectionMembersWithOrderByAsync_System_Int32_System_String_System_Boolean_System_String_SuperOffice_WebApi_RequestOptions_”></a> ExportSelectionMembersWithOrderByAsync(int, string, bool, string, RequestOptions)
ExportSelectionMembers will generate a string that is the result of substituting the template variables with values from selectionmembers.Parameters
selectionId int
The id of the selection to generate the exported file.
templateName string
The templateName parameter is the relative path of a .sxf file template. The .sxf files can be found in \template or in the user folder of the so archive.
useContacts bool
If the selection contains other members than contacts, setting this to true will export the contact archive of the selection.
orderBy string
OrderBy. <Column,OrderBySortType>
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<byte[]> Returns a unicode byte array with the file to export to the user.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GenerateFollowUpsAsync_System_Int32_SuperOffice_WebApi_Data_AppointmentEntity_System_Int32_System_Boolean_System_Boolean_SuperOffice_WebApi_RequestOptions_”></a> GenerateFollowUpsAsync(int, AppointmentEntity, int, bool, bool, RequestOptions)
Generate follow-ups for members in the selection.Parameters
selectionId int
The id of the selection to generate the follow-ups for.
appointmentEntity AppointmentEntity
The AppointmentEntity with information about the appointment.
associateId int
The associate to save the appointments on. If saveOnContactOwner is true, this id will be ignored. Appointments wil be saved on current user if associateId = 0.
saveOnContactOwner bool
If true, the appointments will be saved on contact owner (Our contact). This parameter will override associateId if true.
uniqueContact bool
If true, only one appointment will be created for each contact.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetBoardViewSettingsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetBoardViewSettingsAsync(int, RequestOptions)
Get BoardViewSettings by IDParameters
boardViewSettingsId int
Primary key of BoardViewSettings
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BoardViewSettingsBase> The settings, of appropriate sub type<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetBoardViewSettingsForSelectionAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetBoardViewSettingsForSelectionAsync(int, int, RequestOptions)
Get BoardViewSettings by associate id and selection idParameters
associateId int
Id of associate
selectionId int
Id of selection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BoardViewSettingsBase> The settings, of appropriate sub type<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetDuplicateRulesAsync_SuperOffice_WebApi_RequestOptions_”></a> GetDuplicateRulesAsync(RequestOptions)
Retrieve all available duplicate rules for selectionParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<DuplicateRule[]> All available duplicate rules<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetDuplicatesAsync_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetDuplicatesAsync(string, RequestOptions)
Get duplicates(exact or similar in the database) based on the nameParameters
name string
Name used for lookup
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<DuplicateEntry[]> Any records matching the specified name<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetDynamicSelectionCriteriaAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDynamicSelectionCriteriaAsync(int, RequestOptions)
Get the criteria for this dynamic selection.Parameters
selectionId int
The id of the selection to add members
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionInfo[]> Criteria defining the selection result. NULL if selection does not exist, or if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetDynamicSelectionCriteriaGroupsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetDynamicSelectionCriteriaGroupsAsync(int, RequestOptions)
Get the criteria for this dynamic selection. This call supports multiple criteria groups.Parameters
selectionId int
The id of the selection to add members
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionGroup[]> Criteria groups defining the selection result. NULL if selection does not exist, or if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetParentCombinedSelectionsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetParentCombinedSelectionsAsync(int, RequestOptions)
Get a list of all selection ids where the given selection is used to create a combined selection.Parameters
selectionId int
The selectionId to query for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int[]> Array of selectionIds.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetRecipientStatisticsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetRecipientStatisticsAsync(int, RequestOptions)
Returns a RecipientStatistics object with a count of addresses, emailaddresses and emailaddresses.Parameters
selectionId int
The id of the selection to get the statistics for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RecipientStatistics> Returns a RecipientStatistics object.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetRecipientStatisticsFromContactPersonIdsAsync_SuperOffice_WebApi_Data_ContactPersonId___SuperOffice_WebApi_RequestOptions_”></a> GetRecipientStatisticsFromContactPersonIdsAsync(ContactPersonId[], RequestOptions)
Returns a RecipientStatistics object with a count of addresses, emailaddresses and emailaddresses based on contact and persons in a collection of ContactPersonId.Parameters
contactPersonIds ContactPersonId[]
A collection of ContactPersonId to get the statistics for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RecipientStatistics> Returns a RecipientStatistics object.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetRecipientStatisticsFromProjectMembersAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetRecipientStatisticsFromProjectMembersAsync(int, RequestOptions)
Returns a RecipientStatistics object with a count of addresses, emailaddresses and emailaddresses based on members in a project.Parameters
projectId int
The id of the project to get the member statistics for.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<RecipientStatistics> Returns a RecipientStatistics object.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetSelectionEntityAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetSelectionEntityAsync(int, RequestOptions)
Gets a specific SelectionEntity object.Parameters
selectionEntityId int
The identifier of the SelectionEntity object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> SelectionEntity<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetSelectionForFindAsync_System_String_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetSelectionForFindAsync(string, int, RequestOptions)
Obtain a selection for the given entity, for the current user, of type WorkingSetForFind. Optionally populate criteria from the TypicalSearches systemParameters
entityName string
The name of the entity to make a selection for; examples ‘sale’, ‘project’, ‘y_equipment’
typicalSearchId int
If 0, keep existing criteria; if -1, reset to entity default; > 0 get criteria from given TypicalSearch
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionForFind> Target selection id and provider name<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetSelectionMembersArchiveRowsAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSelectionMembersArchiveRowsAsync(int, string, RequestOptions)
Get the list of members in this selection. The type of members depends on the target table of the selection.Parameters
selectionId int
The selectionId we want selection members for.
select string
(optional) Comma separated Column names to include in result. List of columns varies depending on the selection’s TargetTable. e.g. ‘name’, ‘firstname’, ‘startTime’
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveListItem[]> Array of archive rows, where each item represents one row of data (row level data + the requested columns). NULL if selection does not exist.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetSelectionShadowMembersArchiveRowsAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> GetSelectionShadowMembersArchiveRowsAsync(int, string, RequestOptions)
Get the list of members in this selection’s shadow (i.e. the list of contacts + persons referenced in the main selection).Parameters
selectionId int
The selectionId we want selection members for.
select string
(optional) Comma separated Column names to include in result. List of columns varies depending on the selection’s TargetTable. e.g. ‘name’, ‘firstname,name’, ‘startTime,firstname,name’
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveListItem[]> Array of archive rows, where each item represents one row of data (row level data + the requested columns). NULL if selection does not exist.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_GetSelectionSummariesAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> GetSelectionSummariesAsync(int[], RequestOptions)
Get an array of summaryitem for the given selectionsParameters
selectionIds int[]
The selections to fetch summaries for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionSummaryItem[]> Summary items for the given id’s, in no particular order<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveContactSelectionMembersAsync_System_Int32_SuperOffice_WebApi_Data_ContactPersonId___SuperOffice_WebApi_RequestOptions_”></a> RemoveContactSelectionMembersAsync(int, ContactPersonId[], RequestOptions)
Removes members from the selection as specified in the collection of ContactPersonId.Parameters
selectionId int
The id of the selection where to members will be removed.
contactPersonIds ContactPersonId[]
A collection of ContactPersonId to remove from the static selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveContactSelectionMembersFromIdsAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> RemoveContactSelectionMembersFromIdsAsync(int, int[], RequestOptions)
Removes members from the selection using a collection a selectionmember id’s. Members can only be removed from single selection.Parameters
selectionId int
The id of the selection where to members will be removed.
selectionMembersIds int[]
An array of selectionmember id’s to remove from the selection.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveContactSelectionMembersFromSearchAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> RemoveContactSelectionMembersFromSearchAsync(int, string, RequestOptions)
Removes members from the selection using the search result.Parameters
selectionId int
The id of the selection to remove members.
storageKey string
Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Number of members removed<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveSelectionMembersAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> RemoveSelectionMembersAsync(int, int[], RequestOptions)
Removes members from the selection as specified in the collection of entity ids. The ids are selection member ids (selection member primary key)Parameters
selectionId int
The id of the selection where to members will be removed.
selectionMemberIds int[]
Selection member primary keys
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveSelectionMembersByIdAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> RemoveSelectionMembersByIdAsync(int, int[], RequestOptions)
Removes members from the selection as specified in the collection of entity ids. The ids can be a collection of sale ids, or other supported types.Parameters
selectionId int
The id of the selection where to members will be removed.
ids int[]
A collection of sale/project/contact ids to remove from the selection. The ids can be a collection of sale ids, or other supported types.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_RemoveSelectionMembersFromSearchAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> RemoveSelectionMembersFromSearchAsync(int, string, RequestOptions)
Removes members from the selection using the search result.Parameters
selectionId int
The id of the selection to remove members.
storageKey string
Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Number of members removed<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SaveBoardViewSettingsAsync_SuperOffice_WebApi_Data_BoardViewSettingsBase_SuperOffice_WebApi_RequestOptions_”></a> SaveBoardViewSettingsAsync(BoardViewSettingsBase, RequestOptions)
Save BoardViewSettingsParameters
boardViewSettings BoardViewSettingsBase
Typed BoardViewSettings carrier object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BoardViewSettingsBase> The settings, of appropriate sub type<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SaveBoardViewSettingsForSelectionAndAssociateAsync_SuperOffice_WebApi_Data_BoardViewSettingsBase_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> SaveBoardViewSettingsForSelectionAndAssociateAsync(BoardViewSettingsBase, int, int, RequestOptions)
Save BoardViewSettings on the given selection/associateParameters
boardViewSettings BoardViewSettingsBase
Typed BoardViewSettings carrier object
associateId int
Id of associate
selectionId int
Id of selection
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<BoardViewSettingsBase> The settings, of appropriate sub type<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SaveSelectionEntityAsync_SuperOffice_WebApi_Data_SelectionEntity_SuperOffice_WebApi_RequestOptions_”></a> SaveSelectionEntityAsync(SelectionEntity, RequestOptions)
Updates the existing SelectionEntity or creates a new SelectionEntity if the id parameter is 0.Parameters
selectionEntity SelectionEntity
The SelectionEntity that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<SelectionEntity> New or updated SelectionEntity<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SetDuplicateRulesStatusAsync_SuperOffice_WebApi_Data_DuplicateRule___SuperOffice_WebApi_RequestOptions_”></a> SetDuplicateRulesStatusAsync(DuplicateRule[], RequestOptions)
Set which duplicate rules should be active or notParameters
rules DuplicateRule[]
Duplicate rules to update active status for
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SetDynamicSelectionCriteria2Async_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SetDynamicSelectionCriteria2Async(int, string, RequestOptions)
Update the criteria for this dynamic selection using string. Criteria are parsed from the OData filter form: ”name startswith ‘foo’ and category in (1,2,3)”Parameters
selectionId int
The id of the selection to add members
filter string
Criteria defining the selection result in OData filter form: category in (1,2,3) and name = 'foo'
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionInfo[]> Criteria defining the selection result. NULL if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SetDynamicSelectionCriteria3Async_System_Int32_SuperOffice_WebApi_Data_ArchiveRestrictionInfo___System_String_SuperOffice_WebApi_RequestOptions_”></a> SetDynamicSelectionCriteria3Async(int, ArchiveRestrictionInfo[], string, RequestOptions)
Update the criteria for this dynamic selection. Use criteria as either restriction objects or OData string format. Criteria are parsed from the OData filter form: ”name startswith ‘foo’ and category in (1,2,3)”Parameters
selectionId int
The id of the selection to add members
criteria ArchiveRestrictionInfo[]
Criteria defining the selection result. Pass NULL if using the filter string instead.
filter string
Criteria defining the selection result in OData filter form: category in (1,2,3) and name = 'foo'. Pass NULL or empty string ” if using the criteria objects.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionInfo[]> Criteria defining the selection result. NULL if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SetDynamicSelectionCriteriaAsync_System_Int32_SuperOffice_WebApi_Data_ArchiveRestrictionInfo___SuperOffice_WebApi_RequestOptions_”></a> SetDynamicSelectionCriteriaAsync(int, ArchiveRestrictionInfo[], RequestOptions)
Update the criteria for this dynamic selection. Replaces existing criteria with the new values.Parameters
selectionId int
The id of the selection to add members
criteria ArchiveRestrictionInfo[]
Criteria defining the selection result.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionInfo[]> Criteria defining the selection result. NULL if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_SetDynamicSelectionCriteriaGroupsAsync_System_Int32_SuperOffice_WebApi_Data_ArchiveRestrictionGroup___SuperOffice_WebApi_RequestOptions_”></a> SetDynamicSelectionCriteriaGroupsAsync(int, ArchiveRestrictionGroup[], RequestOptions)
Update the criteria for this dynamic selection. Replaces existing criteria with the new values. This call supports multiple criteria groups.Parameters
selectionId int
The id of the selection to add members
criteria ArchiveRestrictionGroup[]
Criteria groups defining the selection result. Empty array is legal, simply means no criteria have been set
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<ArchiveRestrictionGroup[]> Criteria groups defining the selection result. NULL if this is not a dynamic selection.<a id=“SuperOffice_WebApi_Agents_SelectionAgent_UpdateTypicalSearchAsync_SuperOffice_WebApi_Data_TypicalSearches_SuperOffice_WebApi_RequestOptions_”></a> UpdateTypicalSearchAsync(TypicalSearches, RequestOptions)
Update (import) TypicalSearch information in the databaseParameters
searches TypicalSearches
TypicalSearch structures to import. If null, then the fileset is scanned for *TypicalSearch.json files and those are imported instead
requestOptions RequestOptions
Override language/culture codes on this request.