Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4058420
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:04:38+00:00 2026-05-20T15:04:38+00:00

In Dynamics CRM, I often get requirements from business users to create reports. Business

  • 0

In Dynamics CRM, I often get requirements from business users to create reports. Business users know and speak about entity display names and attribute labels. To write a query, I need to map those to entity names and attribute names. I would like to use a query to look this up.

To what do I join the dbo.LocalizedLabelView view to get the AttributeLabel column in the following query? I can’t figure out what ObjectId is supposed to reference. (And if you can tell me how you figured out the answer I’d be especially appreciative!)

select
    [EntityName]           = entityNames.Name,
    [EntityDisplayName]    = entityDisplayNames.Label,
    [AttributeName]        = attributeNames.PhysicalName,
    [AttributeDisplayName] = attributeDisplayNames.Label
    --[AttributeLabel]     = attributeLabels.Label
from 
    dbo.EntityView entityNames

    inner join dbo.LocalizedLabelView entityDisplayNames
        on entityDisplayNames.ObjectId = entityNames.EntityId
        and entityDisplayNames.ObjectColumnName = 'LocalizedName'

    left outer join dbo.AttributeView attributeNames
        on attributeNames.EntityID = entityNames.EntityID

    inner join dbo.LocalizedLabelView attributeDisplayNames
        on attributeDisplayNames.ObjectId = attributeNames.AttributeID
        and attributeDisplayNames.ObjectColumnName = 'DisplayName'
        and attributeDisplayNames.LanguageID = entityDisplayNames.LanguageID

    --inner join dbo.LocalizedLabelView attributeLabels
    --  on attributeLabels.ObjectId = ?????
    --  and attributeLabels.LanguageID = entityDisplayNames.LanguageID
where
    entityDisplayNames.LanguageID = 1033
order by
    entityDisplayNames.Label,
    attributeDisplayNames.Label
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:04:39+00:00Added an answer on May 20, 2026 at 3:04 pm

    ObjectId is a reference to the internal ID of a thing in the CRM database. This thing can be an attribute, entity, label, or whatever.

    Since you want the label for your attribute, use that attribute’s id as the ObjectId here. I think that you want your join condition to look like this:

    inner join dbo.LocalizedLabelView attributeLabels
        on attributeLabels.ObjectId = attributeNames.AttributeID
        and attributeLabels.LanguageID = entityDisplayNames.LanguageID
        and attributeLabels.ObjectColumnName = 'DisplayName'
    

    If you want the description for the attribute, you can change the ObjectColumnName to ‘Description’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Within Dynamics CRM the Lead entity has both a Status and a Status Reason.
When we create a new field in Microsoft Dynamics CRM, it will create it
In Microsoft Dynamics CRM 2011, I wrote one plug-in in C# for Account entity
I'm trying to build a Dynamics CRM 4 query so that I can get
I am trying to create a dashboard for Dynamics CRM 4.0 using the telerik
The Article entity in MS Dynamics CRM 4.0 doesn't appear to be customizable. Is
I'm trying to find metadata about the length of fields in MS Dynamics CRM
I want to know how to get the user loggin history for MS Dynamics
I am attempting to create a plugin for an onsite Dynamics CRM 2011 installation.
I am trying to get to grips with MS Dynamics CRM 2011. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.