- The expression must be enclosed within single quotes.
- Inside, the whole expression has to be enclosed in parenthesis.
- Each sub expression must be enclosed in parentheses too.
- String values have to be enclosed within double quotes.
- For enumerations use their numeric values.
- For value formatting use various Dynamics AX functions, such as queryValue(), Date2StrXpp(), or methods from the SysQuery class.
Expressions come to rescue when you need to code complex joins and constraints in your queries. I always have trouble setting my larger expressions with quotations and parenthesis It always looked perfect but they always gave error. This was due to no proper Expression specification under my observation untill I found the following (The excerpt is taken from a book on AX: Microsoft Dynamics AX 2012 Development Cookbook )