Skip to main content
Selections, entities, members and tasks <pre><code>NSSelectionAgent agent; agent.callMethod(arg1, arg2);</code></pre>

Constructors

NSSelectionAgent()

Selections, entities, members and tasks <pre><code>NSSelectionAgent agent; agent.callMethod(arg1, arg2);</code></pre>

Methods

AddContactSelectionMembers(Integer,NSContactPersonId[])

Adds the collection of ContactPersonId as members to the static selection
Returns: CRMScript.Global.Void

AddContactSelectionMembersFromSearch(Integer,String)

Adds members to the selection from the search result.
Returns: CRMScript.Global.Integer Example:

AddRemoveContactSelectionMemberInterests(Integer,Integer[],Integer[],Integer[],Integer[])

Adds or removes interests on companies and persons in a selection.
Returns: CRMScript.Global.Void

AddSelectionMembers(Integer,Integer[])

Add selection members to a static selection of type others than contacts.
Returns: CRMScript.Global.Integer Example:

AddSelectionMembersFromSearch(Integer,String)

Adds members from the selection using the search result.
Returns: CRMScript.Global.Integer Example:

CopyContactSelectionMembers(Integer,Integer)

Copies contact selection members from selection into an existing selection.
Returns: CRMScript.Global.Void

CopySelectionMembers(Integer,Integer)

Copies selection members from selection into an existing selection.
Returns: CRMScript.Global.Void

CreateContactSelectionFromSelection(Integer,String,Integer,Bool)

Creates a new selection based on selection members from an existing selection.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateContactSelectionFromShadowSelection(Integer,String)

Creates a new contact selection based on contact selection members from an existing shadow sale, appointment, project or document selection.
Returns: CRMScript.NetServer.NSSelectionEntity
The new selection will always be static even if the original selection is dynamic.
Example:

CreateDefaultMailMergeSettings()

Sets default values into a new NSMailMergeSettings.
Returns: CRMScript.NetServer.NSMailMergeSettings
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateDefaultMailMergeTask()

Sets default values into a new NSMailMergeTask.
Returns: CRMScript.NetServer.NSMailMergeTask
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateDefaultSelectionEntity()

Sets default values into a new NSSelectionEntity.
Returns: CRMScript.NetServer.NSSelectionEntity
NetServer calculates default values (for example, Country) on the entity, which is required when creating/storing a new instance
Example:

CreateNewEntry(NSDuplicateEntry)

Creates a new selection based on external duplicate
Returns: CRMScript.Global.Integer Example:

CreateSelectionEntity(String)

Creates (but do not save) a new selection entity, for the current user and the given target table; other fields populated as by CreateDefaultSelectionEntity()
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateSelectionFromSelection(Integer,String,Integer,Bool)

Creates a new selection based on selection members from an existing selection.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateTemporaryContactSelection()

Creates a temporary selection.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateTemporaryContactSelectionFromContactPersonIds(NSContactPersonId[])

Creates a temporary selection with members from a collection of ContactPerson IDs.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateTemporaryContactSelectionFromProjectMembers(Integer)

Creates a temporary selection with members from an existing project.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateTemporaryContactSelectionFromSelectionMemberIds(Integer,Integer[])

Creates a temporary selection with members from a collection of selection-member IDs.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

CreateTemporarySelectionFromIds(Integer[],Integer)

Creates a temporary selection with members from a collection of entity IDs.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

DeleteContacts(Integer)

Deletes all contacts from a selection.
Returns: CRMScript.Global.Void
If a contact does not have delete rights, it will be skipped.

DeleteEntities(Integer)

Deletes all entities from a selection.
Returns: CRMScript.Global.Void
If an entity does not have delete rights, it will be skipped.

DeletePersons(Integer)

Deletes all persons from a selection.
Returns: CRMScript.Global.Void
If a person does not have delete rights, it will be skipped.

DeleteSelectionEntity(Integer)

Deletes the NSSelectionEntity
Returns: CRMScript.Global.Void Example:

EditContactSelectionMemberDetails(Integer,NSSelectionMemberEditValues)

Edits company and contact details in a selection based on contents in selectionMemberEditValues.
Returns: CRMScript.Global.Void

ExportSelectionMembers(Integer,String,Bool)

Generates a string that is the result of substituting the template variables with values from selection members.
Returns: CRMScript.Global.Byte[] Example:

ExportSelectionMembersWithOrderBy(Integer,String,Bool,String)

Generates a string that is the result of substituting the template variables with values from selection members.
Returns: CRMScript.Global.Byte[] Example:

GenerateFollowUps(Integer,NSAppointmentEntity,Integer,Bool,Bool)

Generates follow-ups for members in the selection.
Returns: CRMScript.Global.Void

GetDuplicateRules()

Retrieves all available duplicate rules for selection
Returns: CRMScript.NetServer.NSDuplicateRule[] Example:

GetDuplicates(String)

Gets duplicates(exact or similar in the database) based on the name
Returns: CRMScript.NetServer.NSDuplicateEntry[] Example:

GetDynamicSelectionCriteria(Integer)

Gets the criteria for this dynamic selection.
Returns: CRMScript.NetServer.NSArchiveRestrictionInfo[] Example:

GetDynamicSelectionCriteriaGroups(Integer)

Gets the criteria for this dynamic selection. This call supports multiple criteria groups.
Returns: CRMScript.NetServer.NSArchiveRestrictionGroup[] Example:

GetParentCombinedSelections(Integer)

Gets a list of all selection ids where the given selection is used to create a combined selection.
Returns: CRMScript.Global.Integer[] Example:

GetRecipientStatistics(Integer)

Returns an NSRecipientStatistics object with a count of addresses and email addresses.
Returns: CRMScript.NetServer.NSRecipientStatistics Example:

GetRecipientStatisticsFromContactPersonIds()

Returns an NSRecipientStatistics object with a count of addresses and email addresses based on contact and persons in a collection of ContactPersonId.
Returns: CRMScript.NetServer.NSRecipientStatistics Example:

GetRecipientStatisticsFromProjectMembers(Integer)

Returns an NSRecipientStatistics object with a count of addresses and email addresses based on members in a project.
Returns: CRMScript.NetServer.NSRecipientStatistics Example:

GetSelectionEntity(Integer)

Gets an NSSelectionEntity object.
Returns: CRMScript.NetServer.NSSelectionEntity Example:

GetSelectionForFind(String,Integer)

Obtains a selection for the given entity, for the current user, of type WorkingSetForFind.
Returns: CRMScript.NetServer.NSSelectionForFind Example:

GetSelectionMembersArchiveRows(Integer,String)

Gets the list of members in this selection. The type of members depends on the target table of the selection.
Returns: CRMScript.NetServer.NSArchiveListItem[] Example:

GetSelectionShadowMembersArchiveRows(Integer,String)

Gets the list of members in this selection’s shadow (i.e. the list of contacts + persons referenced in the main selection).
Returns: CRMScript.NetServer.NSArchiveListItem[] Example:

RemoveContactSelectionMembers(Integer,NSContactPersonId[])

Removes members from the selection as specified in the collection of ContactPersonId.
Returns: CRMScript.Global.Void

RemoveContactSelectionMembersFromIds(Integer,Integer[])

Removes members from the selection using a collection a selection-member IDs.
Returns: CRMScript.Global.Void
Members can only be removed from single selection.

RemoveContactSelectionMembersFromSearch(Integer,String)

Removes members from the selection using the search result.
Returns: CRMScript.Global.Integer Example:

RemoveSelectionMembers(Integer,Integer[])

Removes members from the selection as specified in the collection of entity IDs. The IDs are selection member IDs (selection member primary key)
Returns: CRMScript.Global.Void

RemoveSelectionMembersById(Integer,Integer[])

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.
Returns: CRMScript.Global.Void

RemoveSelectionMembersFromSearch(Integer,String)

Removes members from the selection using the search result.
Returns: CRMScript.Global.Integer Example:

SaveSelectionEntity(NSSelectionEntity)

Updates the existing NSSelectionEntity or creates a new NSSelectionEntity if the ID parameter is 0.
Returns: CRMScript.NetServer.NSSelectionEntity - The new or updated NSSelectionEntity. Example:

SetDuplicateRulesStatus(NSDuplicateRule[])

Sets which duplicate rules should be active or not
Returns: CRMScript.Global.Void

SetDynamicSelectionCriteria(Integer,NSArchiveRestrictionInfo[])

Updates the criteria for this dynamic selection. Replaces existing criteria with the new values.
Returns: CRMScript.NetServer.NSArchiveRestrictionInfo[] Example:

SetDynamicSelectionCriteria2(Integer,String)

Updates the criteria for this dynamic selection using string.
Returns: CRMScript.NetServer.NSArchiveRestrictionInfo[]
Criteria are parsed from the OData filter form: ”name startswith ‘foo’ and category in (1,2,3)”n
Example:

SetDynamicSelectionCriteria3(Integer,NSArchiveRestrictionInfo[],String)

Updates the criteria for this dynamic selection. Use criteria as either restriction objects or OData string format.
Returns: CRMScript.NetServer.NSArchiveRestrictionInfo[]
Criteria are parsed from the OData filter form: ”name startswith ‘foo’ and category in (1,2,3)”n
Example:

SetDynamicSelectionCriteriaGroups(Integer,NSArchiveRestrictionGroup[])

Updates the criteria for this dynamic selection. Replaces existing criteria with the new values. This call supports multiple criteria groups.
Returns: CRMScript.NetServer.NSArchiveRestrictionGroup[] Example:

StartMailMerge(MailMergeSettings)

Starts a mail-merge operation with specified settings.
Returns: CRMScript.Global.Void

UpdateTypicalSearch(NSTypicalSearches)

Updates (imports) TypicalSearch information in the database
Returns: CRMScript.Global.String Example: