web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Do not delete sales order when posting sales invoice from sales order screen

(0) ShareShare
ReportReport
Posted on by

Hi there,

I want to keep sales order list as reference after posting sales invoice from sales order screen. Please advise where in navision i could disable function "delete sales order" upon posting invoice. 

Thanks all. 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    61,003 Super User 2025 Season 2 on at

    Order will be deleted if EverythingInvoiced variable in Codeunit 80 is true.

    so you need to change codeunit 80 with EverythingInvoiced  := FALSE;

  • Community Member Profile Picture
    on at

    Hi,

    To keep a copy of your orders, You can activate the archive function.

    Regards,

    L

  • Suggested answer
    RockwithNav Profile Picture
    8,635 Super User 2025 Season 2 on at

    As Mohana suggested, simply navigate to Codeunit 80 and change EverythingInvoiced to FALSE, it will solve your case, but yoy need to take care certain things like the calculations on the factbox on the sales order screen 

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Agree with other members that you need to change in CU 80

  • Community Member Profile Picture
    on at

    Thanks Mohana Yadav. It works now

  • Verified answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    For you scenario the best option is to use the archive function not to change the standard process of deleting the sales order. Why are you not using the archive function ?

  • Community Member Profile Picture
    on at

    if i make archive, then sales order data will be stored in two places and one sales order can be archived many times --> replicate data.....

  • Suggested answer
    Suresh Kulla Profile Picture
    50,243 Super User 2025 Season 2 on at

    Archive before deleting the sales order so that you will have only one version of archive. You can customize that part.

  • Suggested answer
    Community Member Profile Picture
    on at

    If you can't change the code unit, you can write a SQL query with multiple SELECT statements and UNION to combine sales order data from sales order, sales shipment and sales order archive tables. 

    This will produce output with sales order entries from each one of the 3 source tables (where entries exist) as a separate row. 

    Next, PIVOT the output into a single distinct row, converting each order quantity value into its respective source table column (columns labeled as "Sales Order", "Sales Shipment" and "Sales Order Archive"). 

    And last, add a fourth, calculated column to insert MAX order quantity value from the 3 source columns. This will list your quantity ordered, regardless of the current state of the order so that you can at least report on it. 

    IMHO, deleting a sales order after it is fully invoiced is a really bad idea. I wish I could some day understand why anyone would design a system in such way. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans