Entity.ToEntityReference Method ()

 

Applies To: Dynamics CRM 2015

Gets an entity reference for this entity instance.

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

Syntax

public EntityReference ToEntityReference()
public:
EntityReference^ ToEntityReference()
member ToEntityReference : unit -> EntityReference
Public Function ToEntityReference As EntityReference

Return Value

Type: Microsoft.Xrm.Sdk.EntityReference

Type: EntityReference
The entity reference for the entity.

Examples

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

See Also

Entity Class
Microsoft.Xrm.Sdk Namespace

Return to top

© 2016 Microsoft. All rights reserved. Copyright