Delen via


CrmServiceClient.CreateMultiEntityAssociation Method (String, Guid, String, List<Guid>, String, Guid, Boolean)

 

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Associates multiple entities of the same time to a single entity

Namespace:   Microsoft.Xrm.Tooling.Connector
Assembly:  Microsoft.Xrm.Tooling.Connector (in Microsoft.Xrm.Tooling.Connector.dll)

Syntax

public bool CreateMultiEntityAssociation(
    string targetEntity,
    Guid targetEntity1Id,
    string sourceEntityName,
    List<Guid> sourceEntitieIds,
    string relationshipName,
    Guid batchId = null,
    bool isReflexiveRelationship = false
)
Public Function CreateMultiEntityAssociation (
    targetEntity As String,
    targetEntity1Id As Guid,
    sourceEntityName As String,
    sourceEntitieIds As List(Of Guid),
    relationshipName As String,
    batchId As Guid,
    isReflexiveRelationship As Boolean
) As Boolean

Parameters

  • targetEntity
    Type: System.String

    Entity that things will be related too.

  • targetEntity1Id
    Type: System.Guid

    ID of entity that things will be related too

  • sourceEntityName
    Type: System.String

    Entity that you are relating from

  • relationshipName
    Type: System.String

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

  • batchId
    Type: System.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
    Type: System.Boolean

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

Return Value

Type: System.Boolean

true on success, false on fail

See Also

CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace

Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright