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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Finding an attribute b...
Power Apps
Answered

Finding an attribute by MetaDataId

(5) ShareShare
ReportReport
Posted on by 79

I'm going to put this here, since it took me half a day of work to achieve it.

 

Following scenario:

One of our CI pipelines ran into an error, stating the following:

"The evaluation of the current component(name=Attribute, id=4fe6d1f0-de6d-417c-a930-47e37848debf) in the current operation (Update) failed during managed property evaluation of condition: Managed Property Name: canmodifyrequirementlevelsettings; Component Name: Attribute; Attribute Name: canmodifyrequirementlevelsettings"

 

So the message is clear. The pipeline is trying to update the Requirement Level of an attribute, but since its managed property "canmodifyrequirementlevelsettings" changed by an update, we are not allowed to do so anymore. But which attribute? On which entity/table? The error message only showed us the AttributeId.

 

Unfortunately the message did not state the table which contains this attribute. Also unfortunately that WebAPI MetaData retrieves for getting Attribute Information require entity information. (see https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/mt788314(v=crm.8)#retrieve-metadata-items-by-metadataid) 

 

So, what to do. At first I checked the MetaDataBrowser in XrmToolbox to see if I can lookup the attributeId. Great tool, you can see and lookup the MetaDataId, but here you also need to open up an entity first.

 

Second I created a XLS which contained all attributes from the system with the help of MetaData Document Generator from XrmToolbox. Took pretty long as you can guess. Opened up the document - no MetaDataId available 😫

 

After some time, the SQL 4 CDS tool came to my mind. Opened up the tool, and YES - there is a section for MetaData and a table called "Attributes"! 😍

 

So, creating a short query like stated below, executing - BOOM! We have it!

SELECT displayname,logicalname,entitylogicalname,metadataid,requiredlevel
FROM metadata.attribute
WHERE metadataid = '4fe6d1f0-de6d-417c-a930-47e37848debf'

 

HerrMueller_0-1644504431625.png

 

So now I could look into our repository and update the requiredlevel to the correct one.

I have the same question (0)
  • v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @HerrMueller ,

     

    Thank you very much for your sharing, you might consider writing your solution in the reply and then mark your answer as a 'solution' so that it can better help other users.

     

    Best Regards,

    Charlie Choi

  • Verified answer
    HerrMueller Profile Picture
    79 on at

    You can lookup the attribute by its AttributeID in the Metadata using the "SQL 4 CDS" extension in XrmToolbox.

     

    1. Connect to your environment and open the SQL 4 CDS.
    2. Check if you are able to see the Metadata section and the Attributes subsection.
    3. Paste the following statement in the query editor and replace the ID Value.
    4. Run the query.

     

    SELECT displayname,logicalname,entitylogicalname,metadataid,requiredlevel
    FROM metadata.attribute
    WHERE metadataid = '4fe6d1f0-de6d-417c-a930-47e37848debf'

     

    HerrMueller_1-1644820009249.png

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Absolute lifesaver, this saved me so much time, thanks @HerrMueller 

  • WillyBD Profile Picture
    4 on at

    Hi HerrMueller,

     

    can we also do an update? Like this?

    update metadata.attribute
    set isvalidforgrid = 0
    where metadataid = '1fca9b2a-15bc-ed11-83ff-0022489fd722'

     

    I search for a method to update the isvalidforgrid.

     

    Many Thanks

    Willy

  • HerrMueller Profile Picture
    79 on at

    Hello @WillyBD,

    you can't perform updates via TDS Endpoint (SQL 4 CDS), so I think that's not possible.

    I would do it via customization.xml

  • WillyBD Profile Picture
    4 on at

    Hi HerrMueller,

    thanks for the reply and the suggestion.

     

    If I add the fields in a solution and export it, we can modify the DisplayMask.

    <DisplayMask>ValidForAdvancedFind|ValidForForm|ValidForGrid</DisplayMask>

    We can remove ValidForAdvancedFind, and the update is well done.

    But if we remove the ValidForForm or ValidForGrid, the update is not done, when importing the solution again.

     

    Do you consider this as a bug? Or are those fields protected?

     

    Thanks

    Willy

  • HerrMueller Profile Picture
    79 on at

    Hi @WillyBD,

     

    I don't think that's a supported change to remove "ValidForGrid" or "ValidForForm", but you could involve Support to have more tracing during solution import to have it verified.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard