Skip to main content


Dynamics 365 Community / Forums / Finance forum / Multiple query Updatin...
Finance forum
Suggested answer

Multiple query Updating issues

Posted on by 45

Here I am updating multiple queries in TmpTable for the Ganarter SRS report. When I was trying to generate the report, I got this error, so can you please tell me how to solve it? 

Error Is /update conflict occurred due to another user process deleting the record or changing one or more fields in the record./

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,495 Super User on at
    Multiple query Updating issues
    Tell me one thing. If report is running in a legal entity, why do you need to update temp table in different legal entity via cross company?
    As Andre suggested, selectforupdate is not required.
    A good approach while updating data is to use changecompany instead of crosscompany.
  • Andre Arnaud de Calavon Profile Picture
    Andre Arnaud de Cal... 283,405 Super User on at
    Multiple query Updating issues
    On which select statement do you get the error? The first one or the second? What is your report about? I do see a crosscompany statement in the select query. Do you really have data from different legal entities? If so, you can probaby better make this table no dependent on the dataareaid, but have an own CompanyId field.
    You are joining several tables. Could it be the case that you have multiple records in the purchPrepayTable and PurchReqTable for a single BSInvoiceToPaymentReportTmp record?
    When you have a forUpdate statement in the select query, the separate call before the update() statement is obsolete.
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 2,537 on at
    Multiple query Updating issues
    Try to add  YourTmpTable.reread(); statement after the ttsBegin; statement, and why you added YourTmpTable .selectforUpdate(true) again?
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue

Helpful resources

Quick Links

Upcoming TechTalk: Copilot Capabilities…

Review the Copilot features that are currently available in Dynamics 365 Finance…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…


Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,405 Super User

Martin Dráb Profile Picture

Martin Dráb 223,370 Super User

nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans