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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Attribute display names from the account entity

(0) ShareShare
ReportReport
Posted on by 155

I am trying to get all the attribute display names from the account entity.

I am using CRM 4.0 on premise so XRMToolBox is not an option.

I tried the following SQL query

Select  * from  [MetadataSchema].[Attribute] a  inner join [MetadataSchema].[Entity] e on  e.EntityId=a.EntityId where e.Name='account'

 

But it only has the Name and PhysicalName and not the display name.

What is the correct SQL query to get all the attribute display names from the account entity?

I have the same question (0)
  • Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Please use attributemetadata table to get the display name.

    docs.microsoft.com/.../attributemetadata

    Please mark my answer verified if i were helpful

  • Gansea Profile Picture
    155 on at

    How can I incorporate the attributemetadata table into my SQL query?

  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Gansea,

    This SQL query obtains all the attribute display names from the account entity for Dynamics CRM 4.0.

    USE Contoso_MSCRM
    GO
    
    SELECT  EntityView.Name AS EntityName, LocalizedLabelView_1.Label AS EntityDisplayName,
           AttributeView.Name AS AttributeName, LocalizedLabelView_2.Label AS AttributeDisplayName
    FROM    LocalizedLabelView AS LocalizedLabelView_2 INNER JOIN
           AttributeView ON LocalizedLabelView_2.ObjectId = AttributeView.AttributeId RIGHT OUTER JOIN
           EntityView INNER JOIN
           LocalizedLabelView AS LocalizedLabelView_1 ON EntityView.EntityId = LocalizedLabelView_1.ObjectId ON
           AttributeView.EntityId = EntityView.EntityId
    WHERE   LocalizedLabelView_1.ObjectColumnName = 'LocalizedName'
     AND LocalizedLabelView_2.ObjectColumnName = 'DisplayName'
     AND LocalizedLabelView_1.LanguageId = '1033'
     AND LocalizedLabelView_2.LanguageId = '1033'
     AND EntityView.Name IN ('Account')
    ORDER BY EntityName, AttributeName

    Dynamics CRM 4.0 supports multiple languages and uses a table called LocalizedLabelView to save the attribute display names. 1033 is the LanguageId for English (US) so you will need to alter the SQL query to use another language code if you use another language. This SQL query will not work for Dynamics CRM 3.0, but it is possible to create a SQL query tailored to Dynamics CRM 3.0.

    pastedimage1600291102925v1.png

  • Gansea Profile Picture
    155 on at

    Perfect, exactly what I was looking for.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 98

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 60 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans