Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

How to get metadata from a specific model with x++

(1) ShareShare
ReportReport
Posted on by 54
Hi All,
I come across a requirement to get metadata (all tables or forms or classes) from a given model.
I checked many blogs & got to know about metadata API & metadatasupport class. using this I can get alltables or other objects but didn't get how to get this metadata (all table or forms) from a given model only.
 
Thanks & Regards, 
Rahul
  • Martin Dráb Profile Picture
    Martin Dráb 230,994 Most Valuable Professional on at
    How to get metadata from a specific model with x++
    Does MetadataSupport::GetModelsOfMetadataArtifact() gives you what you want for a single element?
     
    There is no documentation, as far as I know.
  • Layan Jwei Profile Picture
    Layan Jwei 7,679 Super User 2025 Season 1 on at
    How to get metadata from a specific model with x++
    Hi Rahul,
     
    Can you please show us the code you used to get metadata of all models based on the blogs u followed. And then maybe we can help you to get it for a certain model.
     
    Thanks,
    Layan Jweihan
  • Rahul Dahiya Profile Picture
    Rahul Dahiya 54 on at
    How to get metadata from a specific model with x++
    Hi Waed,
    yes we can access any object in AOT directly but I asked in reference of x++. How can we do it with x++ code.
  • Rahul Dahiya Profile Picture
    Rahul Dahiya 54 on at
    How to get metadata from a specific model with x++
    Hi Martin,
    I didn't find any Model property to filter metadata based on model. these are .NET classes & not present in AOT as well. Is their any documentation available on these classes & property.
     
    Thanks & Regards,
    Rahul
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 7,304 Super User 2025 Season 1 on at
    How to get metadata from a specific model with x++
     
    Did you try to go to AOT, right click then choose model view?
    Also did you try to search meta data from search on the AOT?
     
     
    Thanks,
    Waed Ayyad
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
     
  • Martin Dráb Profile Picture
    Martin Dráb 230,994 Most Valuable Professional on at
    How to get metadata from a specific model with x++
    I would have to look at properties of those metamodel classes, but I would expect a property such as Model that you can then use for filtering. Isn't it the case?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,234 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,994 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans