Lately i had some trouble generating CIL. I got some Errors in standard Classes like Retail and SysQuery.
CIL-Generierung: Error 1. Class: SysQuery, Method: queryAddStaticCursorAsRangeAndValue, Exception: System.ArgumentException: Type QueryBuildStaticlink was not found in the CIL that was generated from X++.
ClassesSysQueryqueryAddStaticCursorAsRangeAndValueClassesRetailStatementPostSalesOrderscreateAggregatedSaleLines Err: 351ClassesRetailStatementPostSalesOrderscreateSalesOrders Err: 351
To get rid of the sysQuery error the following steps did the trick:
Compile SysQuery Class
Start Full CIL Generation
When these steps doesn't solve the problem another option is to deleter CIL Files and restart Full CiL:
Stop the AOS
Delete files in this folder
C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL\source