Do you want to easily automate responses to common events in your ERP?
With Business Events & Power Automate you can do just that in Business Central and other Dynamics 365 apps. Business events on Business Central (preview) - Business Central | Microsoft Learn.
In the most recent update Business Events can be used without any Dataverse setup making the toolset more accessible to all.
So what do we get at the moment you ask? Here is a list:
- Customer blocked
- Customer unblocked
- Opportunity activated
- Opportunity closed as lost
- Purchase credit memo posted
- Purchase invoice posted
- Purchase order released
- Purchase payment posted
- Purchase receipt posted
- Quote created for opportunity
- Sales credit limit exceeded
- Sales credit memo posted
- Sales invoice posted
- Sales order released
- Sales payment posted
- Sales shipment posted
- Winning quote converted into sales order
Sales credit limit exceeded
Looking at the available list of events this one jumped out as its one of those events that happens usually between the sales team and finance. Sales stereotypically keen to get the sales on the system, finance with a more discerning eye on things like credit limits / credit insurance.
Setup the flow
Could not be easier just 2 elements
- When a business event occurs
- Update record
The Business Event trigger provides the CustomerID that can be fed into the Update record. As usual to find out the expected value to pass back I used Get Record to check what to send to set Blocked = All. In this case it was just "All".
In Business Central there are a few different flavours of the Credit Limit. Let’s look at this for a moment to understand how the flow works.
Customer Card Credit Limit
The balance due shown on this screen and the format of the Credit limit cell is simply based on posted ledger entries:
We can also see on the Customer Statistics other unposted documents that are in draft or released:
Here the user is immediately advised that the customer's credit limit has been exceeded - note I am yet to enter any sales lines.
Turns out the Business Event 'Sales credit limit exceeded' is triggered by the ledger entry calculation, meaning only when a sales order is posted as an invoice (that then takes the customer over their credit limit) will the event activate.
Timing
Some power automate flows can take a few mins to run. This doesn't appear to be the case for business events. The update is instantaneous.