Share via


CrmServiceClient.CreateMultiEntityAssociation Method

Definition

Associates multiple entities of the same time to a single entity

public bool CreateMultiEntityAssociation (string targetEntity, Guid targetEntity1Id, string sourceEntityName, System.Collections.Generic.List<Guid> sourceEntitieIds, string relationshipName, Guid batchId = default, bool isReflexiveRelationship = false);
member this.CreateMultiEntityAssociation : string * Guid * string * System.Collections.Generic.List<Guid> * string * Guid * bool -> bool
Public Function CreateMultiEntityAssociation (targetEntity As String, targetEntity1Id As Guid, sourceEntityName As String, sourceEntitieIds As List(Of Guid), relationshipName As String, Optional batchId As Guid = Nothing, Optional isReflexiveRelationship As Boolean = false) As Boolean

Parameters

targetEntity
String

Entity that things will be related too.

targetEntity1Id
Guid

ID of entity that things will be related too

sourceEntityName
String

Entity that you are relating from

sourceEntitieIds
List<Guid>

ID's of the entities you are relating from

relationshipName
String

Name of the relationship between the target and the source entities.

batchId
Guid

Optional: if set to a valid GUID, generated by the Create Batch Request Method, will assigned the request to the batch for later execution, on fail, runs the request immediately

isReflexiveRelationship
Boolean

Optional: if set to true, indicates that this is a N:N using a reflexive relationship

Returns

true on success, false on fail

Applies to