What exactly does executeQuery() do?

                   On a form level you have datasource, one or more. You build a query specifying relations between them. Executequery executes this query to get data from underlying tables and show it on a form.

executeQuery method is executed when a form is opened for data display.

The executeQuery method can be overridden on a form data source by right-clicking the Methods node under the data source, pointing to Override Method, and then clicking executeQuery.

Examples:
           The following example executes a data source query.


public void executeQuery()
{
  this.query().dataSourceNo(1).clearRanges();
  if(CityCode.valueStr() != "")
  {
     QueryBuildRange qbrCityCode;
     qbrCityCode =this.query().dataSourceNo(1).addRange(fieldNum(SMJ_CandidateDetails,CityCode));
     qbrCityCode.value(CityCode.valueStr());

   }
   super();
 }

Comments

Popular posts from this blog

SSRS Report using Controller , Contract and RDP classes in D365

Exporting data to Excel through X++ code

COC for Form level method

How to pass the parameter from one form to another in Dynamic365

Multi Select Lookup in SSRS Report in D365