Business Events
How to create Business Events in Dynamics 365 Finance and Operations
Category: Business Events,D365 Finance & Operations,Power Automate Author: d365bits Date: 5 months ago Comments: 0

If you are wondering what business events in D365 Finance and Operations (D365FO) this blog post will be a great starting point for you. Business events provides the capability to alerting or notifying external systems while you are performing business processes.

There are two types of business actions which user can perform.

  1. Workflow action : e.g. Purchase Order Approval
  2. Non-workflow action : e.g. Sales Order Invoice

You must be wondering where is this menu item for the Business Events in D365FO. If you navigate to the path System administration > Setup > Business Events you can find Business Events catalog.

Let’s look at a scenario where you need to send an email once the Sales Order is Invoiced and how we can achieve that using business events.

Business events consists of Business event catalog , End Points , Active events , Inactive events , Errors and Security.

To start with business events we need to start creating a Microsoft Power Automate flow.

Click New > Automated – from blank

Provide a Flow name and then search for Dynamics 365 for Fin & Ops under Choose your flow’s trigger field and then select as shown below in the image and then click create.

Then It will appear as below.

Expand it and then select the Instance, Category, Business Event and Legal entity as shown below.

Add Parse Json step after this as shown below.

Then select the content as Body (@{triggerBody()}) and then update the schema. For the schema you can use the generate from sample and the sample can be found from the business events screen.

How to download the schema from business events is shown below. This is what you can use in the above generate from sample step.

This image has an empty alt attribute; its file name is image-16.png

Add a condition step as shown below.

Add in the Get Record step if you would like to retrieve any sales order fields. Then proceed to provide Instance , Entity Name and Object id as shown below.

Then add in a send an email notification step as shown below. Specify the To , Subject and the message in the email body and then proceed to save the flow.

Once flow is created in Power Automate we can move to create the Endpoint. To do that you have to navigate to Endpoints.

When you press New Icon then you would get few end points as shown below. Select the endpoint which you would like to use. In this scenario I will use “Microsoft Power Automate”.

Then click Next from the bottom of the page.

Then provide the End Point Name and the Power Automate URL if you have that already with you.

Once these steps are done it is the time to test your business event trigger.

Source: Kausun