Data Event Triggered PowerAutomate flow for UK VAT Number

 In this blog I am going to show another way of use the custom connector which went through in a previous blog. In this blog I am going to show how you can use PowerAutomate to Trigger a Approval/Verification flow which will use MS Teams for Approval. This does require the power platform integration to be switched on, that is widely documented on the MS Website and I imagine most newly provisioned environments will have this selected.

Enable the Microsoft Power Platform integration - Finance & Operations | Dynamics 365 | Microsoft Docs

The intention of this flow is when a new UK VAT number record is created, it triggers the API to go and verify if that number is correct then it will post a message to a channel in teams for a VAT team to approve they are happy with the number. This is just an example to highlight the way data events can be used to trigger external API's and approvals and it really open's the door for other opportunities.

The first thing you want to do is click on Advanced settings from the PowerApps site:


Then you need to find the table to make it available, by first clicking on the funnel to use the advanced find function:



Use the option for "Available Finance and Operations Entities:



Put in a query and click results then mark the entity as "Visible":


You will now see the table available in the dataverse, use "MSERP" to search and make sure you select All to see the table, make a note of the naming as conventions can be different between F&O and Dataverse enviroments.


First thing is to create a new flow and add to the flow the "When a row is added, modified or deleted" dataverse step for the same table:



Its not that obvious but the behavior I see is when you create this step in the flow it automatically creates the active data event in the linked F&O business events area in System Admin:




This is now my trigger active so when I create a new record an event will be triggered and therefore we can now do stuff off the back of it...

So I take the value from the VAT number created on the table and pass that to my custom connector:


I create an approval step:


Post an adaptive Card to a teams channel:


Then wait for a response:


Below is a short clip of what this looks like:



In a future post I will show you how to preform an update to the record after the approval takes place.

That's all for now.










Comments

Popular posts from this blog

"Exception while trying to get Virtual Entity metadata for entity" Error on Data Events

Electronic Reporting Bank Statement Import parsing account number for BAI2.

Electronic Reporting displaying Legal Entity Email/Phone by custom Address Purpose