Monday, 8 April 2019

Create batch job using SysOperationFramework

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.



























Friday, 5 April 2019

Clear usage data in D365 Finance and Operations

Today I will be discussing about one of the common issue which you might have encountered at a time of executing batch job for second time.

For instance I was executing a job for first time and  have selected few parameter. At a code level I have set by default the value of batch job processing field to Yes.
However, before executing for second time I did modification in code and setting the batch processing field value to No . So now I was executing same batch job for second time but it batch processing field value was still Yes and due to this reason it was added in batch.

So, in order to reset or get latest code impact after build I need to reset usage data of that particular user.

Following are the steps required to reset usage data.

1- Open Chrome/IE browser.

2-  Click on setting in right most corner and select User options.













3- Click on Usage data button.




4-  Click on Reset button available in bottom. It will clear the usage data of specific or currently login user.


















That's it and your usage data will be reset :)

D365 F&O - Open table in a browser (IE/Chrome)

Today, I will be discussing about two different approaches which can be used for opening tables in chrome/IE in order to view data.

First approach

1 - Go to visual studio.
2-  Right click on the table.














Note : Default company for table browser will be picked from its user which is set as administrator.

Second approach

1- Go to IE or Chrome.
2- Paste the following URL

https://<URL>/?mi=SysTableBrowser&prt=initial&cmp=<Company>&tablename=<TableName>&limitednav=true

Sample : https://ABC.cloudax.dynamics.com/?mi=SysTableBrowser&prt=initial&cmp=USMF&tablename=BankStatementTable&limitednav=true

Cmp             : It is company whose data you want to view.
TableName  : The name of table whom you want to browse.
URL              : https://ABC.cloudax.dynamics.com



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...