Search code examples
dynamics-crm

can I get an entity type using only a guid


I have a process that one of the params been used is a record's guid of a specific entity (always salesorder for example). Now I've been asked to support an other entity (case for example) but I don't want to pass a new param (entity type), I want to use the record's guid to get the entity type, is there an option to get entity type only by guid (c#)


Solution

  • It's not possible to get directly the entity type (or Entity Name if you prefer) from the Guid inside a Dynamics CRM / 365 CE / Dataverse instance.

    You can eventually do a try/catch (like a service.Retrieve to salesorder and if fails try against incident) but is an approach I would not suggest if you have other options available.