0

I know there are a lot of topics about lock issues, but I couldn't find one which relates to my case. I have field DaysInTarget__c, which is updated daily when an opportunity is in Target stage. Also I have the same fields for other stages and my flow works the same for them. I get this error: Info Error Occurred:

The flow tried to update these records: null. This error occurred: UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record or 10 records: 0013X00002nNrI7QAK,0013X00003hk7DsQAI,0013X00003lM4oNQAS,0013X00003j9paGQAQ,0013X00003lLaVFQA0,0013X00003kxITtQAM,0013X00003j805dQAA,0013X00002nNrLkQAK,0013X00002xVgDoQAK,0013X00003kxKOnQAM. You can look up ExceptionCode values in the SOAP API Developer Guid.

These ids are ids of Accounts. I read that update of Opportunity may cause a lock of Account, but it doesn't seem to be obvious for me. What's the real reason of issue and how can I сщккусе this? My flow : enter image description here

enter image description here Thanks!

5
  • If a user or an Apex job is modifying an Account at the same time as this flow is running, you can get this error. As you noticed, Accounts may be modified indirectly, for example when an Opportunity is created or modified. What other activity could be going on when this flow is running? Dec 8, 2021 at 7:40
  • Double-check the account rollups which are based on related opportunities. Those are being saved to database so that mean if an update of these opps causes the rollups to recalculate the account gets locked.
    – Damecek
    Dec 8, 2021 at 8:00
  • @SanderdeJong I am pretty sure there are no such activities
    – Vonahclom
    Dec 8, 2021 at 9:35
  • @Damecek unfortunately the only rollup on Account is related to opportunity is Opportunity amount and it isn't updated when my flow fulfills
    – Vonahclom
    Dec 8, 2021 at 9:37
  • Usually my flow works fine, so I don't think some mechanisms like trigger influence on this behaviour.
    – Vonahclom
    Dec 8, 2021 at 10:00

1 Answer 1

1

You could try to run just the first action in the flow and then check if the account were updated. I bet it will. That would mean that in background some update is happening, trigger, workflow, process builder, flow, rollup.

1
  • unfortunately not, last modified of the account is related to updated opportunity is from 22.11.2021...
    – Vonahclom
    Dec 8, 2021 at 11:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .