Naming Conventions: Variables [AX 2012]

Updated: December 1, 2011

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Variables of general types (primitive and composite data types) should be named logically.

Variables of specialized types (extended data types) should have the same name as the type (which should have a logical name) but starting with a lower case character.

If you have more than one variable of the same specialized type, use logical names that contain the name of the type as a prefix.

Avoid one-character variable names, except for temporary 'looping' variables, like i and j, or coordinate variables like x and y.


InvoiceJour invoiceJour;

InvoiceLine invoiceLine;

CustTable custTable;

CustTrans custTrans;

MarkupTrans markupTrans;

int i;

The prefix of the variable can be removed if the name of the variable is still understandable.

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.

Community Additions