“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