X++ tips, tricks and notes

Ax 2012

Microsoft Dynamics AX Debugging Users group

Here is a quick but useful tip that I learned today: If you see this when you expected to see the debugger: Go to Control Panel -> System and Security -> Administrative tools -> Computer Management (To find it quickly, press the windows key on […]

What is the name of the database?

I rarely need to work with the AX database. In my company developers work on the AOS, and leave SQL related thing to the BI and installation people. Therefore, if I want to see the name of the database that an AX installation uses, it […]

How to add a range or data source to a form data source

Adding a second datasource with X++, or a range to a form datasource should be simple, yet today I spent ages trying strange things with multiple records. In the end it took me, two senior developers and a existing example in Dynamics AX to get […]

Errors in AxCompileAll.html after AxBuild compile

Errors in AxCompileAll.html after AxBuild compile

When you do a full compile with AxBuild, a AxCompileAll.html log file is created with all the compile errors and warnings that you would normally see in the Compiler output window. Normally it looks something like this in a browser: If your log file looks […]

Workbook.ExportAsFixedFormat in Microsoft Dynamics AX

How to export a file to PDF in Dynamics AX Microsoft has an extremely useful .NET method named ExportAsFixedFormat() for exporting office files to PDF. For example, you can invoke the ExportAsFixedFormat() method on an Excel Workbook object and a PDF file is then created […]

How to generate a list of field names and field properties

How to generate a list of field names and field properties

Today I quickly wanted to see which fields in the PurchLine table are mandatory. Purchline is a large table, so instead of checking the properties of each field, I quickly wrote a job that displays an info log of all the mandatory fields. I used […]