Monday, 1 October 2018

SQL Query to get the List of customized Entity in Dynamics CRM



SQL Query to get the List of customized Entity in Dynamics CRM onpremisis



SELECT
DISPLAYNAME.LABEL 'Display Name',
EV.NAME 'Logical Name',
ObjectTypeCode 'Object Type Code'
FROM
ENTITYVIEW EV INNER JOIN
LOCALIZEDLABELLOGICALVIEW DISPLAYNAME
ON (EV.ENTITYID = DISPLAYNAME.OBJECTID) AND (DISPLAYNAME.OBJECTCOLUMNNAME = 'LOCALIZEDNAME')
WHERE
LANGUAGEID = 1033 -- Add this if you want to filter records using language Id. For Example : LANGUAGEID 1033 is English
AND ISCUSTOMENTITY = 1 -- Remove this if you want to show the system entities as well
--AND ISACTIVITY = 0 -- Add this if you want to filter out the activity entity
AND EV.NAME NOT LIKE '%MSDYN%' -- Add this if you want to remove like post album, filter, etc
ORDER BY 2

No comments:

Post a Comment

How to Trigger a Microsoft Flow from a Custom Button in Dynamics 365

  When using Microsoft Flow the out-of-the-box button is nested under the ‘Flow’ section and is not easy to find nor is it customizable. Tri...