Creating General Journal Lines in Business Central using Power Automate
The requirement was to take an externally generated transaction in Dynamics CRM, which is a GL transaction with Dimensions and insert this into a General Journal Batch within Business Central, using Microsoft PowerAutomate. Once posted in BC, a separate PowerAutomate Flow updates the record in CRM with the GL Entry number, so the systems can be reconciled.
CRM Transaction, with amounts, GL Codes, Descriptions and Dimensions
The trigger for the Flow is the Batch Send to BC button. When this is changed, PowerAutomate queries records in CRM, and finds all the records ready to be posted, with a FetchXML Query:
A PowerAutomate Loop is created and used to create all Journal Lines in BC and after successful posting, the transaction record in Dynamics CRM is updated with the GL Code and Dimensions posted.
It is not possible to update dimensions for a journal line as standard. In order to solve this part of the requirements, we wrote and deployed an API to Dynamics Business Central, to allow PowerAutomate to update the lines, once created.
The end result is a Journal in Dynamics Business Central, ready to post!
For more information, visit our Dynamics 365 Business Central page or simply get in touch.