Entity.ToEntity<T> Method ()

 

Updated: November 29, 2016

Applies To: Dynamics 365 (online), Dynamics 365 (on-premises), Dynamics CRM 2016, Dynamics CRM Online

Gets the entity as the specified type.

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

public T ToEntity<T>()
where T : Entity

Return Value

Type: T

Type: Entity
The entity as the specified type.

Type Parameters

T

Type: Entity. The entity type to return.


Account retrievedAccount = service.Retrieve(account.LogicalName, account.Id, new ColumnSet("primarycontactid")).ToEntity<Account>();
Return to top

Microsoft Dynamics 365

© 2016 Microsoft. All rights reserved. Copyright

Show: