Entity.ToEntityReference Entity.ToEntityReference Entity.ToEntityReference Entity.ToEntityReference Method

Definition

Gets an entity reference for this entity instance.

public:
 Microsoft::Xrm::Sdk::EntityReference ^ ToEntityReference();
public Microsoft.Xrm.Sdk.EntityReference ToEntityReference ();
member this.ToEntityReference : unit -> Microsoft.Xrm.Sdk.EntityReference
Public Function ToEntityReference () As EntityReference

Returns

Examples


RetrieveRequest request = new RetrieveRequest
{
Target = account.ToEntityReference(),
ColumnSet = new ColumnSet(),
RelatedEntitiesQuery = new RelationshipQueryCollection()
};

RetrieveRequest request = new RetrieveRequest
{
Target = account.ToEntityReference(),
ColumnSet = new ColumnSet(),
RelatedEntitiesQuery = new RelationshipQueryCollection()
};

Applies to