How to create and run the Runbase batch class in D365
In this article, you will learn how to create and run a batch class that extends RunBaseBatch in D365. A batch class is a class that can be scheduled to run periodically or on demand on the Application Object Server (AOS) or a client. A batch class must extend the RunBaseBatch class, which provides the methods and properties that the system needs to run the class as a batch job. Steps to create a batch class: 1. Open the Application Object Tree (AOT) in a development workspace and create a new class under the Classes node. Give it a meaningful name, such as MyBatchClass. 2. In the class declaration, add extends RunBaseBatch to indicate that your class inherits from the RunBaseBatch class. 3. Override the run method of the RunBaseBatch class and write your business logic in it. This is the method that will be executed when the batch job runs. For example, you can write code to query and update some records in a table. 4. Override the pack and unpack methods of the RunBaseBatch class and...