Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Multiple query Updating issues

(1) ShareShare
ReportReport
Posted on by



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
    3,624 Moderator 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.
  • André Arnaud de Calavon Profile Picture
    294,261 Super User 2025 Season 1 on at
    Multiple query Updating issues
    Hi,
     
    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
    8,287 Super User 2025 Season 1 on at
    Multiple query Updating issues
    Hi,
     
    Try to add  YourTmpTable.reread(); statement after the ttsBegin; statement, and why you added YourTmpTable .selectforUpdate(true) again?
     
    Thanks,
    Waed Ayyad
    If this helped, please mark it as "Verified" for others facing the same issue
     
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,009 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans