18 December 2019

From date and toDate query ranges in Report and form X++ code in AX 2012

Below logic can be used for filtering using from date and to date.

dateRange.value(SysQuery::range(FromDate.dateValue(), ToDate.dateValue()));

Form level in the execute query can write the below logic.

QueryBuildRange dateRange = SysQuery::findOrCreateRange(this.queryBuildDataSource(), fieldNum(MyTable, MyDateField));

How to add the Display method in the form level in D365 F&O

 The below examle is to add the form -Data source level adding display method and assigning to form design control.