Posts

Showing posts with the label Query based filter

Creating a batch job with query based filter in D365 back-office

There are often business processes that requires us to run specific operations as a batch process. Dynamics 365 Head quarters (HQ) allows us to be able to periodically execute batch jobs. To create a custom batch job you need to extend the  RunBaseBatch class. The following lines of code show how we can create a simple export job.  class InvoiceExport extends RunBaseBatch {      Query                   query;     QueryRun                invoiceQueryRun; // QueryRun object that will be used to generate data for invoices to be exported.      DialogGroup             dialogGroupSetup; // This is a dialog group.     DialogField      ...