Tuesday, 1 December 2015

SQL Query to list the Entity & Display Name in Microsoft Dynamics CRM

It is just a brief post since I need this in my current project and want to share to you and also in case I forgot where I did save it.

So here is the SQL Query as per mentioned in the Title

The Query

select en.Name, en.LogicalName, displayname.ObjectColumnName, displayname.Label, IsCustomEntity from 

entityview en
inner join LocalizedLabelLogicalView displayname
on en.EntityId = displayname.ObjectId
and displayname.ObjectColumnName = 'LocalizedName'
where IsCustomEntity = 1 -- remove this if you want to show the system entities as well
--and add the isActivity = 0 if you want to filter out the Activity entity
--if you want to remove like post album, filter, etc
--and en.Name not like '%msdyn%'
order by label

Result


image

If you have multiple language for display name then I believe you need to join to the language ID as well.

Hope this helps! Thanks

9 comments:

  1. Great blog. If you want to buy a good CRM Software for all purposes, please contact us from the links below

    The web based crm software topic of discussion here is very much serious as well as they are all counting regarding the online lead management CRM tool as well as its advantages. Make this a must for your all custom crm solutions possibilities and within quick time you will start feeling up the change. Business as well as all related aspects is carefully managed by this new custom built crm tool.

    ReplyDelete
  2. This is very nice blog,and it is helps for student's.Thanks for sharing..
    MS SQL Server 2016

    ReplyDelete
  3. Apply online for Microsoft Recruitment. Get the information about the current and upcoming vacancies here.

    ReplyDelete
  4. Exactly the function I needed, thanks!

    ReplyDelete
  5. Thanks for the valuable Content. I really learned a lot here. Do share more like this.
    Advantages Of Salesforce
    Benefits Of Salesforce CRM

    ReplyDelete

My Name is..