How to get ObjectTypeCode and LogicalName of all Entities in Dynamics CRM using Web API?

In my earlier article, i have explained,

How to get list of all Entities Display Name, Logical Name and Other info using SQL Query in MSCRM?

Now, follow the below steps to get all Entities Logical Names and Object Type Codes in Dynamics CRM Online or On-premises.

Step 1: Login to Dynamics CRM and Navigate to Settings -> Customizations.

Copy the Instance Web API URL (Service Root URL).

URL looks like the below,

https://[CRM ORG Name].api.crm9.dynamics.com/api/data/v9.1

Step 2: We have to use the below text to get the ObjectTypeCode and LogicalName

/EntityDefinitions?$select=LogicalName,ObjectTypeCode

Step 3: Append Instance Web API URL text with the above URL (mentioned in Step 2), final URL looks like the below,

https://[CRM ORG Name].api.crm9.dynamics.com/api/data/v9.1/EntityDefinitions?$select=LogicalName,ObjectTypeCode

Step 4: Browse the above URL in a new Browser window to see the below result.

Note: To get all custom entities Logical Names and Object Type Codes only, then use the below URL.

https://[CRM ORG Name].api.crm9.dynamics.com/api/data/v9.1/EntityDefinitions?$select=LogicalName,ObjectTypeCode&$filter=ObjectTypeCode gt 9999

Hope this article helps you !!!

Advertisement

One thought on “How to get ObjectTypeCode and LogicalName of all Entities in Dynamics CRM using Web API?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.