1 point

Simple C# code to retrieve an Entity Record - Microsoft Dynamics CRM Forum Community Forum


dashboard

Tue May 26 2020 18:32:44 GMT+0000 (UTC)

Posted by @sabih53

private Entity RetrieveEntityById(IOrganizationService service, string strEntityLogicalName, Guid guidEntityId)

       {

           Entity RetrievedEntityById= service.Retrieve(strEntityLogicalname, guidEntityId, newColumnSet(true)); //it will retrieve the all attrributes

           return RetrievedEntityById;

       }

How to call?

Entity entity = RetrieveEntityById(service, "account", guidAccountId);
content_copy Copy

https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/157766/simple-c-code-to-retrieve-an-entity-record