Partilhar via


OrganizationServiceProxy.Disassociate Method

Definition

Deletes a link between records.

public:
 virtual void Disassociate(System::String ^ entityName, Guid entityId, Microsoft::Xrm::Sdk::Relationship ^ relationship, Microsoft::Xrm::Sdk::EntityReferenceCollection ^ relatedEntities);
public void Disassociate (string entityName, Guid entityId, Microsoft.Xrm.Sdk.Relationship relationship, Microsoft.Xrm.Sdk.EntityReferenceCollection relatedEntities);
abstract member Disassociate : string * Guid * Microsoft.Xrm.Sdk.Relationship * Microsoft.Xrm.Sdk.EntityReferenceCollection -> unit
override this.Disassociate : string * Guid * Microsoft.Xrm.Sdk.Relationship * Microsoft.Xrm.Sdk.EntityReferenceCollection -> unit
Public Sub Disassociate (entityName As String, entityId As Guid, relationship As Relationship, relatedEntities As EntityReferenceCollection)

Parameters

entityName
String

The logical name of the entity specified in the entityId parameter.

entityId
Guid

The ID of the record from which the related records will be disassociated.

relationship
Relationship

The name of the relationship to be used to remove the link.

relatedEntities
EntityReferenceCollection

A collection of entity references (references to records) to be disassociated.

Implements

Remarks

The core implementation of the Disassociate method. For more information, see IOrganizationService.Disassociate(String, Guid, Relationship, EntityReferenceCollection).

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

Applies to