Simple metadata query in Powershell (D365FO)
source link: http://dev.goshoom.net/2020/10/simple-metadata-query-in-powershell-d365fo/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Simple metadata query in Powershell (D365FO)
If I need to extra metadata of a D365FO application, my preferred way is the new metadata API. But sometimes the requirement is so simple that it’s sufficient to query source XML files directly.
For example, this all what’s needed to get a list of fields from a table (together with their types) and store it in a CSV file. It’s written in Powershell:
[xml]$xml = Get-Content $inputXmlFilePath $xml.AxTable.Fields.AxTableField | select Name, ExtendedDataType, EnumType | Export-CSV $outputCsvFilePath -nti
It’s great for trivial cases like this. If I needed more details about fields or I had to take into account table extensions, for example, then the metadata API would be a better choice.
Filed under Dynamics Community Syndication, EN | Tagged D365FO, Dynamics 365, metadata, Powershell | Comment | Permalink
Leave a Reply Cancel reply
Your email address will not be published.
Comment
Name
Website
Save my name, email, and website in this browser for the next time I comment.
Post navigation
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK