Compare records in code

When saving a record, I had to check which fields had changed and react in a special way if only certain fields (and not any other) changed their value. I could iterate all fields and compare their values in two table buffers (the original and the updated one), but I thought that D365FO might already …

Continue reading ‘Compare records in code’ »

Thoughts on element prefix vs. suffix

When I read Evaldas Landauskas’s blog post Development guidelines: Prefix Vs. Suffix, I thought I would write a comment below the post and share a few ideas, but then I decided that it’d be better to write my own blog post. Here I have a much better control over formatting and the content will be …

Continue reading ‘Thoughts on element prefix vs. suffix’ »

Splitting .xpo files

I got an .xpo file from an older version of AX with some code of interest and because it had a few thousand lines, it wasn’t exactly easy to navigate. At least splitting it by object would make my life much easier. Fortunately I looked at the internet and found exactly the right tool for …

Continue reading ‘Splitting .xpo files’ »

Reference group and GROUP BY

This blog post explains a problem that you can run into when using reference group controls with grouped data – and a solution for this problem. I have a table which stores references to workers. The field has HcmWorkerRecId data type, i.e. it stores record IDs from HcmWorker table. When I drop this field to …

Continue reading ‘Reference group and GROUP BY’ »

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’ »