03 January 2024

Filter the form by date range in Dynamics 365 F&O or AX 2012 X++ code

Need to add range to the query.

Example: Need to add range in ExecuteQuery() method.

QueryBuildRange queryBuildDateRange = SysQuery::findOrCreate(this.queryBuildDataSource(),fieldNum(MyTable,Field));

queryBuildDateRange.value(SysQuery::range(fromDate.DateValue(),Todate.dateValue()));

Service class to get the selected record and deleted matching records and refresh the form data source in D365 F&O

 [DataContractAttribute] class ABCUserProfilesBulkDeleteContract {         UserId userId;     [DataMemberAttribute('UserId')]     pu...