Use the Purchase Header Archive

AnonymousAnonymous Guest Posts: 137
edited 2003-08-12 in Navision Attain
Hello,
How can i remove an “order” of the table « Purchase Header », so that the “order” transfer in the table « Purchase Header Archive » (this “order” was to deliver and invoice without processes of validation but with function “copy documents”.
Thank's,Benoît

Comments

  • eromeineromein Member Posts: 589
    Sure, do something like this:
    OnDelete();
    
    IF "Document Type" IN ["Document Type"::Quote, "Document Type"::Order] THEN
      IF CloseDocument THEN
        ArchiveDoc(True,True)
      ELSE
        ArchiveDoc(False,True);
    
    In codeunit 90 the header will be deleted without triggering the OnDelete trigger. So add this code to codeunit 90 as well.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
Sign In or Register to comment.