Friday, April 17, 2015

Query in X++ code and AOT

  1. There are two ways to create queries:
  2. 1. Create Static Query using a graphical interface.
  3. 2. Dynamic queries by x++ code using System class.


Statics Query


How to add select button on RunBaseBatch Using Static Query on class.using RunBaseQueryDialog to display the select button on form.


 Simple class.

1) HrmAbsenceCreateTables- is a query.
    HRMAbsenceCreateTables - is a class
    HCMWorker,HCMEmployment,DirPerson - tables are used in the query.

2) WorkCalendarDelete,WmsOrderFinish


3) RunbaseBatch Class without Select button
    Class - EventJobDueDate

4) Inheritance Class
    HcmSkillChartDepartment,HcmSkillGapByJobSkill


Example

5) Table - EcoResColor-lookupProductVariantColor

6) SSRS Class - AssetBalancesPeriodDP, BankAccountStatementDp ,SalesOrderEntryStatisticsDP,
SalesOrderEntryStatisticsContract, SalesOrderEntryStatisticsController.
7) Forms - VendSearchCriterion,VendSearchAddCategory.
.

Dynamic Query

  1. construct query by using X++ code.
JmgPayEventsExport(Method :BuildEmployeeQuery) class is the example of query.

InventUpdate class implements Query to wrire Business logic.

https://community.dynamics.com/ax/b/daxmusings/archive/2011/09/27/query-and-new-related-objects-in-ax-2012.aspx

No comments: