Simple metadata query in Powershell (D365FO)
Views (32)
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.
This was originally posted here.

Like
Report
*This post is locked for comments