web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Logic app issue - Dead...
Power Automate
Unanswered

Logic app issue - Deadlock when writing a record

(0) ShareShare
ReportReport
Posted on by 9

I have a Logic App that reads data from an Azure SQL table and creates a GL Journal in D365.   This works 90% of the time but every once and a while (a couple times a week) one of the entries in the journal lines will fail with this error:

 

An error has occurred.  Write failed for table row of type 'LedgerJournalLineEntity'. Infolog: Info: Cannot create a record in Journal lines (LedgerJournalTrans). Journal batch number: JBN0018064, ARR000140052.\nDeadlock, where one or more users have simultaneously locked the whole table or part of it.
 
The rest of the lines before and after the failed record write just fine.
I have tried playing with the Concurrency control (setting it to 1) but that did not help.  Someone suggested that if I included the line number in my supplied values it would fix this but I cannot figure out how to do that (it is not one of the fields available, and even if I go into code view and try it says it is not a field that can be populated).  Thanks.
Categories:
I have the same question (0)
  • Christopher S Profile Picture
    on at

    Hi @MarkGilbert 

     

    When flow actions run, they might lock the resource they are writing to as if it was a database that locks table/rows/columns. This can be related to more that one user adding records at exactly the same time so you are getting this error message. Unfortunately, Flow doesn't have a setting nor a way to fix this scenario

     

    Best Regards,

  • MarkGilbert Profile Picture
    9 on at

    I am very sure that no one else , no other app or person is trying to access the journal that I am creating.

  • Verified answer
    v-alzhan-msft Profile Picture
    on at

    Hi @MarkGilbert ,

     

    Could you please share the screenshot of the flow?

    Could you please make sure that you don't have any other flow would run at the same time to lock the table?

     If not, I suggest that you could contact Microsoft for any help on this issue.

     

    Best regards,

    Alice   

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • MarkGilbert Profile Picture
    9 on at

    I think I am going to call this resolved. I was looking back and it has only failed one time in the last month (ever since I set the concurrency to 1).   I think when that fail happened I assumed that the concurrency did not help but it looks like it did. I will just chalk that one fail up to a fluke.   If it starts happening regularly again I will submit another post.  Thank you.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard