Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

field translation in sql query

Posted on by Microsoft Employee

Hi Experts,

do you have any sample code ? or explanation or article that i can reference?

Thanks

*This post is locked for comments

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Automatic field translation in sql query report

    Hi,

    you can refer to below post, use the last query that provided.

    [View:https://community.dynamics.com/crm/b/crmjimwang/archive/2009/03/27/get-entity-47-attribute-39-s-display-name-from-crm-database:750:50]

    Language code

    docs.microsoft.com/.../enable-multiple-language-support

    Sample code

    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'  <-- change the language code (LCID) accordingly.

    AND LocalizedLabelView_2.LanguageId = '1033'  <-- change the language code (LCID) accordingly.

    AND EntityView.Name IN ('Account','Contact')   <-- replace your entity name

    ORDER BY EntityName, AttributeName

    Please note that this is unsupported

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans