Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Sales Order Total values not refresh when delete Sales Line OnBeforeReopenSalesDoc Event

Posted on by
I am deleting Sales Order line OnBeforeReopenSalesDoc Event , Below are the coding using to delete the Sales Order line . After deleting the sales order line its not refresh the sales order /Total amount/ and /Total amount Incl GST/ fields. But actually value updated, when go back to Sales Order list and come back to Sales Order again, I can see the correct value in Total Value section. Problem is when click the ReOpen button delete the line , but can't see updated value in Total section, seems page not refresh 
 
Could you please help to sort out this issue ?
 
 
if SalesHeaderRec.GET(SalesHeader./Document Type/, SalesHeader./No./) then begin
 
            SalesLineRec.SETRANGE(/Document No./, SalesHeader./No./);
            if SalesLineRec.FINDSET() then begin
                repeat
 
                    if SalesLineRec./No./ = '8640' then begin
                        SalesLineRec.DELETE;
                    end;
                until SalesLineRec.NEXT = 0;
            end;

        end;
Categories:
  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    Sales Order Total values not refresh when delete Sales Line OnBeforeReopenSalesDoc Event
    Maybe you can find some help in this YouTube viddeo ?
    Where Erik Hougaard discuss similar issues that what you experience.
     

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans