Introduction:
This text describes how to implement bi-directional data synchronization between SharePoint and Business Central using Power Automate flows.
Scenario:
Consider a scenario where a company uses Business Central to manage purchase orders internally but wants to allow external users or customers to access and verify these purchase orders without giving them direct access to Business Central ERP. Instead, they are given access to a SharePoint site where their purchase order is listed. To achieve this, we create a corresponding table in SharePoint for purchase orders, and the data between the SharePoint table and Business Central is synchronized.
Solution Overview:
The synchronization between Business Central and SharePoint is achieved using Microsoft Power Automate flows.
The synchronization process involves four key steps, all done by Power Automate flows:
- New Entry in Business Central: Whenever a new entry is created in Business Central, a corresponding entry is automatically created in SharePoint.
- Update in Business Central: Whenever any entry is updated in Business Central, same entry is also updated in SharePoint.
- New Entry in SharePoint: Similarly, when a new entry is added in SharePoint, it triggers the creation of a corresponding entry in Business Central.
- Update in SharePoint: Updating an entry in SharePoint automatically updates the corresponding entry in Business Central.
Finally, with the SharePoint list item ID obtained, the flow proceeds to update the corresponding item in the SharePoint 'Pro Forma list'. The 'Update Item' action is configured to map the fields of the SharePoint list item with the corresponding fields from the modified entry in Business Central, ensuring that the changes are accurately reflected in SharePoint.
New Entry in SharePoint / update in SharePoint:
To handle both the creation and updating of entries in Business Central based on changes in SharePoint, a single Power Automate flow is created:
The flow is triggered by the 'When an item is created or modified' SharePoint trigger. This trigger ensures that the flow is activated whenever a new item is created or an existing item is modified in SharePoint.
A condition is added in the flow to determine whether the record received from SharePoint already exists in Business Central. If the record is found to be present, the flow proceeds to update the existing record with the new values received from SharePoint. If the record is not found, the flow creates a new record in Business Central with the values received from SharePoint.
Conclusion:
Thus by following the outlined steps and Power Automate flows, the data between SharePoint and Business Central can be synchronized. This synchronization ensures that any input entered by a customer in the SharePoint site is reflected in the company's Business Central and vice versa, all without the need for customers to have direct access to Business Central.
0 Comments