Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

The changes to the record cannot be saved because some information on the page is not up-to-date

Posted on by 2,224 Super User 2024 Season 1
Hello Community Members - 
 
I had seen similar posts to this error, but didn't seem to find a solution yet. When I am trying to execute the below code in my Job Queue I get an error message pasted in color
 
1. There is a repeat until above this code with some basic filters
2. CUPostSalesInvoiceUtility is a codeunit which creates and posts a sales invoice. Whenever an error occurs, it will satisfy the ELSE condition. A simple error handling scenario
 
I get the error when the code hits the MODIFY in the ELSE Section, second time. The first time it hits the MODIFY in the ELSE section, no error. The record with each loop is getting changed, I verified that
 
if CUPostSalesInvoiceUtility.Run() then begin
    RecWMSSalesHeader./Processing Status/ := RecWMSSalesHeader./Processing Status/::Success;
    RecWMSSalesHeader./Processing Status Details/ := 'Transaction Created Successfully.';
    RecWMSSalesHeader./Processing Status D/T/ := CurrentDateTime;
    RecWMSSalesHeader.Modify();
end else begin
    RecWMSSalesHeader./Processing Status/ := RecWMSSalesHeader./Processing Status/::Failure;
    RecWMSSalesHeader./Processing Status Details/ := GetLastErrorText();
    RecWMSSalesHeader.Modify();
end;
 
ERROR
The changes to the record cannot be saved because some information on the page is not up-to-date. Close the page, reopen it, and try again.
Categories:
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,746 Super User 2024 Season 1 on at
    The changes to the record cannot be saved because some information on the page is not up-to-date
    I think in this case it is all about figuring out what trigger or event you should place your code under.
    Where have you placed this code now?
    Are you using an eventsucscriber or a trigger?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,302 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans