Today, I will discussing about how to create a batch job using SysOperationFramework in Dynamics 365 Finance And Operations.
Let's suppose we need get all customer open transaction with negative amount whose payment method is null and update their fields on basis of some logic. Also, user will have option to select number of customers on run time.
In order to achieve our target we need create 3 new class.
1- Contract
2- Service
3- Controller
Step 1- Create a query in my case i have taken join between CustTrans and CustTransOpen tables and added ranges on AccountNum, AmountCur and PaymMode fields.
Step 2- Create a new Contract class and add query in it.
Step 3- Create a new Service class and add method in it for executing the logic and get query from data contract. Execute query by using QueryRun. Add some logic in executeMode method as per your requirement like in my case I need to update some records.
Step 4 - Create a new controller class.
Step - 5 Create a new action menu item and set the controller class name as object and set the
processing method name from service class in parameter field.
Step - 6 Final output of the batch job.
Subscribe to:
Post Comments (Atom)
Custom Business events Part 3 - (Activate custom business event) in D365 F&O
In this blog we will discuss about the steps to activate a custom business in D365 F&O. As we know that business event catalog does not...
-
Today, I will share another part of connecting azure blob storage with Dynamics 365 for finance and operations series. This part will be abo...
-
Today I will be discussing about how to create batch job through x++. Before going in code lets discuss what are batch jobs. Batch job : ...
-
Today, I will share another part of connecting azure blob storage with Dynamics 365 for finance and operations series. This part will be abo...
No comments:
Post a Comment
Note: only a member of this blog may post a comment.