Skip to main content

Notifications

Announcements

No record found.

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

Not able to update Sales order Status in Business Central

(1) ShareShare
ReportReport
Posted on by 149
Hi All,

We are using On-Prem Business Central.

I have created on action menu under the Action as Update Order status,  and it is working fine when i am tried to update the status for any sales order. But when i change the company and then i tried to update the status i am getting below error. 


code : 
Rec.Status := Rec.Status::"Pending Approval";
Rec.Modify(true);
I am not able to figure out why this issue occur for other company.
Does any only have any idea, please share with me.

Thanks for your response.
 
  • Suggested answer
    Yi Yong Profile Picture
    Yi Yong 1,528 Super User 2024 Season 2 on at
    Not able to update Sales order Status in Business Central
    Hello,
     
    Try adding in "CurrPage.Update()" after Rec.Modify(true).
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 10,010 Super User 2024 Season 2 on at
    Not able to update Sales order Status in Business Central
     
    You need to add CurrPage.Update() before your code.
    CurrPage.Update();
    Rec.Status := Rec.Status::"Pending Approval";
    Rec.Modify(true);
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 5,496 on at

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,575 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans