web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

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

Arun Potti Profile Picture Arun Potti 1,442

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 !!!


This was originally posted here.

Comments

*This post is locked for comments