Importing GL transaction data into Dynamics AX 2012 using X++ and LedgerGeneralJournalService

In this post, I provide an example of how to import data into a general ledger journal. The included X++ code sample uses the Services framework to transfer and validate the GL data. The specific service used in this example is LedgerGeneralJournalService.
Continue reading →

“Method not found” error occurs in X++ when calling static method of .NET class

I’ve encountered a particular “Method not found” error in Microsoft Dynamics AX 2012 which I’d like to share. In my case, the error appears to be related to the quirky X++ dangling semicolon. With the release of AX 2012, the syntax requirement to include a dangling semicolon within X++ methods had been dropped from AX development best practices. However, there appears to be at least one situation where it’s still required.
Continue reading →

Sending email via SMTP using X++ and .NET Framework in Dynamics AX

Sending custom email notifications is a very common requirement for Dynamics AX. The code sample included in this post contains the following features: attaching files, designating email priority setting, specifying To/From/CC recipients, and populating the subject line and body of the email. It’s assumed that you already have an operational SMTP server which is accessible from within your local network.
Continue reading →

Debug::assert() method calls in SYS layer triggering Dynamics AX 2012 debugger

I’ve noticed a behavior in the RTM version (6.0.947.0) of Microsoft Dynamics AX 2012 that has been causing some problems for me lately. Specifically, there are some Debug::assert() method calls in the SYS layer that are being triggered in the application when running in a development environment with debugging enabled (client-side and/or server-side).
Continue reading →