The Power Automate action Create Record in Business Central journal lines, doesn't have the fields/object to fill in journal batch ID or journal ID. But when tested, the error says "You must specify a journal batch ID or a journal ID to get a journal line."
Has anyone successfully used Power Automate to create records in BC journal lines? If so, what's the work around this limitation?
Initially it contains the fields to specify organization and table name, once the table name is selected (journalLines), I wait a few second and new fields appear below including the journalId. Although I'm entering the journal batch into the journalId field, I'm getting the same error as @Jamz
The is how we got this working:
Use HTTP GET to retrieve the record by filtering on the Journal Batch Name:
Use Parse JSON with the HTTP Body as input:
The Parse JSON will output all the journal table fields including the GUID, which we assign to a variable and then use as input for the standard BC actions:
Thanks for the reply. I think I saw your other post on this method as well (after some extensive Googling). However, isn't the journal batch ID a static value? I traced between the Journal Batches view, which it's called SystemID in and then at journal line level it's called the JournalBatchID. So could we not just force the static value in Power Automate if we know the Journal BatchID? You would need some logic in your flows to set different IDs then based on what type of batch you wanted to use then (if you're using multiple batches). Do you think this would work?
Also, how are you using that BatchID when creating the journalLines in Power Automate?
@achilles1988 Yes I think you are correct, the journal batch GUID is static and you could use that instead of the journal batch name in the workflow steps if you know the GUID value in advance. In our case the data in our SQL table already has the batch name assigned. We also found for troubleshooting Power Automate errors that it is easier to see the journal batch name instead of the GUID in the output.
For loading the journal lines, we are using HTTP POST, only because the standard journalLines API v2.0 doesn't have fields for inputting the Dimensions, which we require, and so we published our own Web Service page for it.
Ah. I hadn't even got that far to notice. I would also require dimensions. Pretty severe limitation of the Power Automate connector for BC.
May I ask what tables did you need to expose to web services to get that to work?
HI, thanks for this info, I am facing the same issue since the dimensions are not exposed via the business central connector. Can you expand on your authentication method for your API call? I am seeing using token, azure api, but I was wondering if there was something simpler that I am missing?
Has anyone found a solution to this? I have the journalbatchID and I'm using that in the JournalID column and I get this error message. It works in another flow but not this one and I can't figure out why.
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.