CRUDExtentions.CreateMultiEntityAssociation Method

Definition

Associates multiple entities of the same time to a single entity

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

Parameters

serviceClient
ServiceClient

ServiceClient

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

bypassPluginExecution
Boolean

Adds the bypass plugin behavior to this request. Note: this will only apply if the caller has the prvBypassPlugins permission to bypass plugins. If its attempted without the permission the request will fault.

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