OrganizationServiceContext.DetachLink(Entity, Relationship, Entity) Method

Definition

Removes the specified link from the list of links being tracked by the OrganizationServiceContext.

public:
 bool DetachLink(Microsoft::Xrm::Sdk::Entity ^ source, Microsoft::Xrm::Sdk::Relationship ^ relationship, Microsoft::Xrm::Sdk::Entity ^ target);
public bool DetachLink (Microsoft.Xrm.Sdk.Entity source, Microsoft.Xrm.Sdk.Relationship relationship, Microsoft.Xrm.Sdk.Entity target);
member this.DetachLink : Microsoft.Xrm.Sdk.Entity * Microsoft.Xrm.Sdk.Relationship * Microsoft.Xrm.Sdk.Entity -> bool
Public Function DetachLink (source As Entity, relationship As Relationship, target As Entity) As Boolean

Parameters

source
Entity

The source entity participating in the link to be marked for deletion.

relationship
Relationship

The name of the attribute or navigation property on the source entity that represents the source in the link between the source and the target.

target
Entity

The target entity involved in the link that is bound to the source object.

Returns

true if the specified entity was detached; otherwise false.

Remarks

Any link being tracked by the OrganizationServiceContext, regardless of its current state, can be detached.

Applies to