Power Community

Power Community

Dynamics 365 Business Central: Power Automate and multiple record changes limitation

Last week I received a message from a partner with a problem related to Dynamics 365 Business Central and Power Automate. The partner had a Power Automate workflow triggered by the “When a record is created” action of the Business Central connector:

The workflow was successfully running from a lot of time.

Now the partner implemented a procedure where lots of records are loaded into Dynamics 365 Business Central from Configuration Packages or from an external procedure and the workflow became unreliable. It was not always triggered and the consistency of the process was broken.

Why this?

You need to remember that the Business Central connector for Power Automate has some functional limits and one of this is related to the number of records created or modified in a certain time-window. Currently, there’s a limit on how many records a Power Automate flow can process. If more than 100 records are created or changed within 30 seconds, the flow won’t be triggered.

The limit is mainly due to the fact that the Power Automate flow triggering is done via webhook notifications, and this limitation is due to the way the Business Central connector handles collection notifications. 

If you have a Power Automate flow that is trigger by the “When a record is created” or “When a record is changed” actions and you want that it will be triggered also with tons of record inserted or changed in a very small time frame, you will have a lot of troubles.

If someone of you was last year in Hamburg at the “Real-world solution architecture with Business Central and Power Platform” session I’ve done with Josh at Directions EMEA, I’ve explained exactly this problem and I’ve provided a solution I personally use in cloud environments for handling these “massive data loading” scenarios.

Last year we’ve done a demo for this scenario where we essentially use Azure Queues. On every record creation/change in Business Central, we insert a JSON message in an Azure Queue with data of the changed record in Business Central (essentially if it was created or changed and its SystemId).

Something like:

{
   "SystemID": "",
   "Operation": "insert"
}

Then, the Power Automate (or Logic Apps) workflow started from the “When there are messages in a queue” trigger:

The Power Automate flow is essentially the following:

This is much more reliable for handling massive record changes with the Business Central connector. It also permits you to handle faults: if for some reason a flow execution fails, the message related to the changed record in Business Central will still be on the queue and you can process it again the next time you execute the flow, without loosing transactions (things that happens with webhooks).

Please remember this limitation and act accordingly if you want to handle reliable workflows triggered by massive operations on Business Central records in a low-code approach.

Plans for the future are to change the way Power Automate will handle the record modification operations and use the same technology of the recently announded external business events. This will be extremely more reliable.

This post was originally published on this site

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

Announcing SharePoint Embedded General Availability

Authored by: Zach Rosenfield Today we’re pleased to announce the general availability of SharePoint Embedded, a new way to build...

More Articles Like This

- Advertisement -spot_img