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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Is there a way to find which entity a particular field belongs to?

(0) ShareShare
ReportReport
Posted on by

I'm working on a Dynamics CRM 2015 environment and am searching for a particular field. I know it exists, but am not sure which entity it is on. The system is heavily customized and has a ton of entities (OOTB+custom). Is there an easy way to find a particular field if I know its schema name?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at
    RE: Is there a way to find which entity a particular field belongs to?

    Hi Cranialsurge,

    You cannot find the entity name based on the field name.

    Entities are separate table in SQL Database, and they can have identical fields also between them.

    eg: Entity A having field name "new_description" and Entity B having field name "new_description"

    Hope that helps

    Thanks

  • Verified answer
    Royal King Profile Picture
    27,686 on at
    RE: Is there a way to find which entity a particular field belongs to?

    Is it on-premise or online ? if you have on-premise version of crm you could use below query to find entity name as well all the required information about an attribute 

    SELECT MetadataSchema.Attribute.Name,   MetadataSchema.Attribute.AttributeRequiredLevelId,   MetadataSchema.Attribute.PhysicalName, MetadataSchema.Attribute.Length,

    MetadataSchema.Attribute.MaxLength,   MetadataSchema.Attribute.DefaultValue,   MetadataSchema.Attribute.VisibleToPlatform,   MetadataSchema.Attribute.IsPKAttribute,

    MetadataSchema.Attribute.PrecisionValue,   MetadataSchema.Attribute.MinValue, MetadataSchema.Attribute.MaxValue,   MetadataSchema.Attribute.AttributeId,

    MetadataSchema.Entity.Name,   MetadataSchema.Entity.OriginalLocalizedName

    FROM    MetadataSchema.Entity INNER JOIN

    MetadataSchema.Attribute ON   MetadataSchema.Entity.EntityId = MetadataSchema.Attribute.EntityId

  • Bhuvaneswary Rajasekaran Profile Picture
    405 on at
    RE: Is there a way to find which entity a particular field belongs to?

    yes indeed by writing a sql query provided u have access to db.

    SELECT EntityView.Name AS EntityName, LocalizedLabelView_1.Label AS EntityDisplayName,
    LocalizedLabelView_2.Label AS AttributeDisplayName, AttributeView.Name AS AttributeName,
    Type = (select XmlType from MetadataSchema.AttributeTypes where AttributeTypeId = AttributeView.AttributeTypeId)
    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 ('contact')
    order by AttributeName

    Ref - http://mscrm-chandan.blogspot.in/2013/04/get-all-attribute-detail-of-entity-in.html

  • Community Member Profile Picture
    on at
    RE: Is there a way to find which entity a particular field belongs to?

    I'm trying to determine where the Entity Definition / Areas that display this entity info is stored in the database? 

  • D365Life Profile Picture
    on at
    RE: Is there a way to find which entity a particular field belongs to?

    Does anyone have an answer to this question? How do you find the entity from a CRM Form?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans