Find D365FO labels in Powershell

You can use Dynamics 365 > Find labels… in Visual Studio to find D365FO labels, but its capabilities are quite limited. Sometimes a better option is searching through the underlying text files directly and you can easily automate it with Powershell. The following script looks at all label files for US English and finds all …

Continue reading ‘Find D365FO labels in Powershell’ »

Word document from code

Sometimes you may want to generate a Word document from code in D365FO, which gives you much more control over the result than if you simply printed a report to Word. Here is a very brief example of how you can do it. Start with creating an X++ project. Then add a C# class library …

Continue reading ‘Word document from code’ »

Weird behaviour after moving a form to another package

I recently had to move a form to another package, because we decided to extract some functionality to its own independent package. I moved files, built both packages and everything looked fine, so I started making changes for a new requirement. But later I noticed something strange in the form. When I opened the form, …

Continue reading ‘Weird behaviour after moving a form to another package’ »

XML response from OData services

If you call OData services in AX 7 (Dynamics 365 for Finance and Operations), you typically get data in JSON format, like this: { "@odata.context":"https://myaxinstance.cloudax.dynamics.com/data/$metadata","value":[ { "name":"ElectronicPaymentTypes","kind":"EntitySet","url":"ElectronicPaymentTypes" },{ "name":"ExpensePaymentDetails","kind":"EntitySet","url":"ExpensePaymentDetails" } … ] } JSON is a simple, lightweight format with good support in many tools, but sometimes you would rather get XML. XML is by …

Continue reading ‘XML response from OData services’ »

‘Get latest’ failed on a file without permissions

A few days ago I was getting latest changes from VSTS to an AX 7 development box when it failed on a certain (custom) .dll file, because Visual Studio wasn’t able to overwrite the file. I made sure that all AX services are down, but it made no difference. Then I looked at file permissions …

Continue reading ‘‘Get latest’ failed on a file without permissions’ »