D365 BC - Use Power Automate flows in Business Central
Ahmad Subhani
Chartered Management Accountant (CMA) | D365 - Business Central Functional Consultant [ Implementation & Support ]
Introduction
With Business Central, you receive a Microsoft Power Automate license, allowing seamless integration of your Business Central data into workflows. Through the Business Central connector, you can effortlessly create flows and access data from both internal and external sources.
Power Automate flows are activated by various events, such as new record creation, modifications, or deletions. Additionally, you can schedule flows according to your preferences or execute them on demand, ensuring flexibility and efficiency in your processes.
This feature is present on Almost every Major Page of Business Central Like Items, Customers, Vendors, Jobs, Work Centers, Sales (Quote, Blanket, Orders, Invoice), Purchase (Quote, Blanket, Orders, Invoice) and a lot more pages.
You will find 3 Options in every Automate Options and for the reference I have attached one screenshot above from "Customer Card". First we need to discuss these 3 Points and in this article we are going to discuss one example of each case.
About Power Automate
Home Page of Power Automate
Types of Cloud Flow
There are 4 types of Cloud Flow in Power Automate.
Automated Cloud Flow
Instant Cloud Flow
Scheduled Cloud Flow
Desktop Flow
Scenario
When we create a Customer in the system and Notifications will be shared on Teams and also a mail will be generated for that.
Process
Click on the Automated Cloud Flow and then a New window will open. After that specify a "Flow Name" and you can also specify the "Trigger". If you specify a trigger then your process can be easily but for this example we are going to click on the "Skip".
Blank Flow will open.
After that click on the "Add a trigger" and then Search the connector of "Business Central" and select that.
Click on Show More for Business Central then all the triggers will open.
For this example we are going to use the Trigger "When a Record is Created". After that we have to specify the Parameters.
Environment: Specify the Environment [Which is Sandbox here]
Company: Specify the Company [Which is CRONUS International Ltd. here]
API Category: The API Category which is v2.0
Table Name: Specify the Table Name [Which is Customer here]
To Add an Action, Click on "Plus" and then Click on "Add an Action".
领英推荐
Now we are adding the Action of Teams and a Trigger name as "When a new channel message is added".
When you select this trigger then there are 2 Parameters we need to specify.
Now before specifying the fields, let me show you the "Teams" and the "Channel" in the Microsoft Teams. We are going to create the notification in the "Power Platform and the Announcements".
Now jumping back to the Power Automate the we are going to specify the Fields.
Teams: Name of the Teams.
Channel ID: Name of the Channel.
Now we are going to attach a Parallel Branch which is going to be the "Outlook". Means we are also going to get the Mail.
Specifying the Connector of the Outlook.
I Click on the "Send an Email". Now we have to specify the Paramaters.
To: The Mail will send to the ID which we specify here.
Subject: The Subject of the Mail.
Body: The Body of the Mail.
Advanced Parameters: Here we can specify many things and one of them is "From", and then in that we can specify the Mail from which we are going to send the mail.
This is the final look of the complete process.
Now once the process is done then we need to save that and once it is saved then we can click on the Test.
We can do a Test Run. When we click on Test then we have to use the option "Manually". After that click on Test.
If I go to the "My Flow" option the we can see that flow in here. And if you want to check when it is created then see the Modified Column.
And too check the details we can click on the Flow. And you can check the Status of the Flow that it is enabled or not.
After that go to business Central and the click on "New". And fill the details.
After that you can go to email and you can see that the Mail is received.
Also the Notification on the Microsoft Teams.
Hope so, you have learned from this article.
Ahmad Subhani
Functional Consultant
MB-800 Microsoft Certified