OrganizationServiceProxy.Associate Method (String, Guid, Relationship, EntityReferenceCollection)

 

Applies To: Dynamics CRM 2015

Creates a link between records.

Namespace:   Microsoft.Xrm.Sdk.Client
Assembly:  Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

Syntax

public void Associate(
    string entityName,
    Guid entityId,
    Relationship relationship,
    EntityReferenceCollection relatedEntities
)
public:
virtual void Associate(
    String^ entityName,
    Guid entityId,
    Relationship^ relationship,
    EntityReferenceCollection^ relatedEntities
) sealed
abstract Associate : 
        entityName:string *
        entityId:Guid *
        relationship:Relationship *
        relatedEntities:EntityReferenceCollection -> unit
override Associate : 
        entityName:string *
        entityId:Guid *
        relationship:Relationship *
        relatedEntities:EntityReferenceCollection -> unit
Public Sub Associate (
    entityName As String,
    entityId As Guid,
    relationship As Relationship,
    relatedEntities As EntityReferenceCollection
)

Parameters

  • entityName
    Type: System.String

    Type: String. The logical name of the entity specified in the entityId parameter.

  • entityId
    Type: System.Guid

    Type: Guid. The ID of the record to which the related records will be associated.

Implements

IOrganizationService.Associate(String, Guid, Relationship, EntityReferenceCollection)

Remarks

The core implementation of the Associate method. For more information, see IOrganizationService.Associate.

For more information about the exceptions that can be thrown when calling OrganizationServiceProxy methods, see Handle exceptions in your code.

See Also

OrganizationServiceProxy Class
Microsoft.Xrm.Sdk.Client Namespace
Troubleshooting and error handling
Use the IOrganizationService web service to read and write data or metadata
Entity metadata
Customize entity relationship metadata

Return to top

© 2016 Microsoft. All rights reserved. Copyright