Power Automate series: Trigger the Dynamics 365 Finance and Operation business event using power automate

Power Automate series: Trigger the Dynamics 365 Finance and Operation business event using power automate

Hey there. In this Power Automate series part 7, I am going to show you how to trigger the Dynamics 365 Finance and Operation business event using the power automate flow. 

If you want to know more about the Power automate or business event then you can read my previous articles and follow me for for the future updates on the similar topics. 

Step 1: Go to the Power Automate environment dashboard and click on the Create flow button.

No alt text provided for this image

Step 2: Create a new Instant Flow with name "D365 FO Business event flow" and select "Manually trigger a flow" option

No alt text provided for this image

Step 3: Click on Add step and search for the "Fin&Ops" connector and select the "When a Business event occurs" trigger.

No alt text provided for this image

Step 4: Set the parameters value. I am going to use the "Batch job started" business event which lies under the "Batch" category, and set the legal entity which is a company Id is "DAT"

No alt text provided for this image

Step 5: Now add the Parse JSON action. Power Automate's JSON Parse action is a powerful tool that you can use to transform the raw JSON output of an HTTP request into values that you can use as dynamic content in your flows. Select the content "body" dynamically from the above action.

No alt text provided for this image

Step 6: For picking the schema as shown in the above figure, Go to System administration > Setup > Business event > Business event catalog. Search by Business event Id "BatchJobStartedBusinessEvent" and click on download schema.

No alt text provided for this image

Step 7: After downloading the schema, copy it and click on the "Generate from sample" button and paste it as shown in the figure of Step 5.

Step 8: Add a compose action and map the values as shown in the below figure but its optional. I am simply filtering the output and making it more readable for you.

No alt text provided for this image

Step 9: Now click on save button.

Step 10: For testing purpose, I have created a batch job with name "Power automate demo". But before executing it, click on the Business event option on the above and enable the start parameter to Yes. Otherwise your event will not trigger.

No alt text provided for this image
No alt text provided for this image

Step 11: Run your power automate flow and also execute the batch job.

Step 12: Your flow will run successfully.

No alt text provided for this image

Step 13: For verify the output, you can expand the Compose node and check the Job Id value and match it with your batch job number in the Fin&Ops environment as shown in the below figures.

No alt text provided for this image
Power automate - flow output value
No alt text provided for this image
Fin&Ops batch job form

Don't forget to add your feedback here.

Happy Learning,

Syed Amir Ali.

Chukwuma Obasi

Full Stack Software Developer | JavaScript | Redux | React | Ruby | Rails | Python | Django | MySQL | X++ | C# | Vue JS

1y

Thanks for sharing. Your posts are helpful. If you don't I was read your article on Custom excel import on D365 F&O. And I try replicating that, however, I noticed that in the code you referenced two tables but one was defined on your solution. I did not get the final output as you did. I don't if you another article that is more explicit?

Like
Reply
Khawaja Muhammad Bilal Kashmiri

A.F. Solution Architect》MCP 》MS Dynamics AX & D365 F&O 》Supply Chain Professional》Gold Medalist 》Hospital & Lab MIS 》Retail Applications 》Integrations 》Customized ERP 》Power Automates

1y

Great! Keep helping community by your valued blogs. Best wishes

To view or add a comment, sign in

More articles by Syed Amir Ali

Others also viewed

Explore topics