In this blog post we will see how to enable Data events in tier1 and tier 2 environments and how to subscribe to them using dataverse connector.

In my previous post we saw what data events are! With new power platform integration capabilities now your Finance and operations enviornment is connected to dataverse environment. If you are deploying an environment through LCS your power platform enviornment is provisioned and you can attach dataverse to it later or if you already have licensed enviornment is created with dataverse.

If you have an existing dataverse enviornment then you can make connection later as well. I have explained that in my earlier post.

For Tier two enviornment, as this integration enabled by default you can subscribe to data events or business events from F&O using dataverse connector.

However, because of the architecture differences between cloud-hosted development environments and the sandbox or production environments, Power Platform Integration can’t be set up after the developer environment is created, this was possible earlier through script present on the Microsoft docs article but its no longer supported.

That’s leaves us with the only option of enabling the power platform integration while deploying tier 1 environments through LCS.

Let’s look at steps about how we can subscribe to data events or Business events from F&O in power automate using dataverse connector.

Once you create a instant  flow in power automate  select dataverse connector as shown below and select catalog as Finance and operations and category belongs to your business event.

In my scenario I created a custom business event for Data export import framework, so I selected it.

One thing you should note, once you restore data in tier 2 environments say for example from gold enviornment to prod during initial migration the catalog and catalog assignments table in dataverse goes blank and business events won’t show up in Catalog. You need to perform deployment / database sync which makes these table sync with business event catalog.

This custom business events sends downloadable blob URL using which we can download file exported by F&O and save it in azure blob.

The full integration project for this can be downloaded from my github page.

Now, let’s look at how we can use data events.

Remember, Data events are available only in environments that the Microsoft Power Platform integration is enabled.

Similar to business events where we select “when action is perform trigger” when we create flow, you can select trigger “when row is added, modified  or deleted” as shown below.

 Once you select trigger you can select F&O entity in the table name. You can either enable these entities from F&O using activate button in data events tab in the business event catalog or You can enable F&O entity as virtual entity in dataverse.

I opted to send data events when purchase order is modified, so I selected purchase order header entity. Modify data events are triggered by update operations on the underlying tables of an entity. 

In my scenario, I am simply sending email to notify but you can use this process to notify record change to any other systems.

This is how we receive records from F&O through data events functionality when we use them in power automate.

Thats all for now.