Creating an editor template

Editor templates allow developers to reuse commonly used blocks of code. Dynamics AX provides a number of out of the box code templates for creating construct() , main(), and parm() methods, various statements such as if, else, switch, code comments, and others. The existing templates can also be modified, or new templates can be created.

In this recipe, we will create a new code template for the find() method, which is normally created on most of the tables. The template will only be available for table methods and will automatically detect the current table's name and use its primary key to determine the method's arguments.

How to do it...

Carry out the following steps in order to complete this recipe:

  1. In the AOT, locate ...

Get Microsoft Dynamics AX 2012 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.