Archive fully received and invoiced orders: Where is code?

Hi mates.

Does any1 know where NAV does this in the code? I mean if you´ve got "Archive Quotes and Orders" in tablee 312 enabled, I can´t find in the code where does the archive.

I see on delete trigger does some deletion but I dont see where it does such archive.

Answers

  • RockWithNAVRockWithNAV Member Posts: 1,139
    If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.

    Codeunit - 80

    IF Ship OR Receive THEN
    ArchiveUnpostedOrder(SalesHeader);

    GO Inside the above function in Codeunit 80 only, you will find

    ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);

    Go Inside this function (Codeunit 5063 is called)

    StoreSalesDocument(SalesHeader,FALSE);

    This functions stores the information in Archival Tables.



  • JuhlJuhl Member Posts: 724
    I use this tool a lot
    http://www.g-d-t.de/download.htm
    Follow me on my blog juhl.blog
  • txerifftxeriff Member Posts: 501
    edited 2018-06-18
    If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.

    Codeunit - 80

    IF Ship OR Receive THEN
    ArchiveUnpostedOrder(SalesHeader);

    GO Inside the above function in Codeunit 80 only, you will find

    ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);

    Go Inside this function (Codeunit 5063 is called)

    StoreSalesDocument(SalesHeader,FALSE);

    This functions stores the information in Archival Tables.



    Thanks for your response. I already found that before but I as far as I know NAV gets rid of the order if fully received and invoiced, that code will run only if ship/receive.
    I wanted to know where it decides to get rid of it. Some mates also told me you have to receive & invoice from the order screen otherwise it won´t get rid of it (if you invoice shipment/receipt won´t work)
    Maybe I´m mistaken.

    thanks.
  • sorenhinrupsorenhinrup Member Posts: 136
    > @txeriff said:
    > RockWithNAV wrote: »
    >
    > If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.
    >
    > Codeunit - 80
    >
    > IF Ship OR Receive THEN
    > ArchiveUnpostedOrder(SalesHeader);
    >
    > GO Inside the above function in Codeunit 80 only, you will find
    >
    > ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);
    >
    > Go Inside this function (Codeunit 5063 is called)
    >
    > StoreSalesDocument(SalesHeader,FALSE);
    >
    > This functions stores the information in Archival Tables.
    >
    >
    >
    >
    >
    >
    >
    > Thanks for your response. I already found that before but I as far as I know NAV gets rid of the order if fully received and invoiced, that code will run only if ship/receive.
    > I wanted to know where it decides to get rid of it. Some mates also told me you have to receive & invoice from the order screen otherwise it won´t get rid of it (if you invoice shipment/receipt won´t work)
    > Maybe I´m mistaken.
    >
    > thanks.


    The fully invoiced order is deleted when it’s posted from the sales order page.
    If you invoice through the combined posting function, then you are correct, the order remains. But NAV has a standard report that deletes full invoiced orders, report 399 “delete completely invoiced orders”
  • txerifftxeriff Member Posts: 501
    > @txeriff said:
    > RockWithNAV wrote: »
    >
    > If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.
    >
    > Codeunit - 80
    >
    > IF Ship OR Receive THEN
    > ArchiveUnpostedOrder(SalesHeader);
    >
    > GO Inside the above function in Codeunit 80 only, you will find
    >
    > ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);
    >
    > Go Inside this function (Codeunit 5063 is called)
    >
    > StoreSalesDocument(SalesHeader,FALSE);
    >
    > This functions stores the information in Archival Tables.
    >
    >
    >
    >
    >
    >
    >
    > Thanks for your response. I already found that before but I as far as I know NAV gets rid of the order if fully received and invoiced, that code will run only if ship/receive.
    > I wanted to know where it decides to get rid of it. Some mates also told me you have to receive & invoice from the order screen otherwise it won´t get rid of it (if you invoice shipment/receipt won´t work)
    > Maybe I´m mistaken.
    >
    > thanks.


    The fully invoiced order is deleted when it’s posted from the sales order page.
    If you invoice through the combined posting function, then you are correct, the order remains. But NAV has a standard report that deletes full invoiced orders, report 399 “delete completely invoiced orders”


    I just wanted to know where it decides to delete order if invoice and receive from order, where in the code triggers. I know about that report.

    At the end I had to call that report with order number, find out from invoice receipt and pass to it and let it decide if it´s time to delete.
  • sorenhinrupsorenhinrup Member Posts: 136
    txeriff wrote: »
    > @txeriff said:
    > RockWithNAV wrote: »
    >
    > If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.
    >
    > Codeunit - 80
    >
    > IF Ship OR Receive THEN
    > ArchiveUnpostedOrder(SalesHeader);
    >
    > GO Inside the above function in Codeunit 80 only, you will find
    >
    > ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);
    >
    > Go Inside this function (Codeunit 5063 is called)
    >
    > StoreSalesDocument(SalesHeader,FALSE);
    >
    > This functions stores the information in Archival Tables.
    >
    >
    >
    >
    >
    >
    >
    > Thanks for your response. I already found that before but I as far as I know NAV gets rid of the order if fully received and invoiced, that code will run only if ship/receive.
    > I wanted to know where it decides to get rid of it. Some mates also told me you have to receive & invoice from the order screen otherwise it won´t get rid of it (if you invoice shipment/receipt won´t work)
    > Maybe I´m mistaken.
    >
    > thanks.


    The fully invoiced order is deleted when it’s posted from the sales order page.
    If you invoice through the combined posting function, then you are correct, the order remains. But NAV has a standard report that deletes full invoiced orders, report 399 “delete completely invoiced orders”


    I just wanted to know where it decides to delete order if invoice and receive from order, where in the code triggers. I know about that report.

    At the end I had to call that report with order number, find out from invoice receipt and pass to it and let it decide if it´s time to delete.
    This is all controlled in Codeunit 80. Depending on the version you are using, either in the "code" function or as a seperate function called DeleteAfterPosting
  • txerifftxeriff Member Posts: 501
    txeriff wrote: »
    > @txeriff said:
    > RockWithNAV wrote: »
    >
    > If I talk about Sales Order then here is the Sequence. I assume you have enabled archival in Sales & Receivable setup.
    >
    > Codeunit - 80
    >
    > IF Ship OR Receive THEN
    > ArchiveUnpostedOrder(SalesHeader);
    >
    > GO Inside the above function in Codeunit 80 only, you will find
    >
    > ArchiveManagement.ArchSalesDocumentNoConfirm(SalesHeader);
    >
    > Go Inside this function (Codeunit 5063 is called)
    >
    > StoreSalesDocument(SalesHeader,FALSE);
    >
    > This functions stores the information in Archival Tables.
    >
    >
    >
    >
    >
    >
    >
    > Thanks for your response. I already found that before but I as far as I know NAV gets rid of the order if fully received and invoiced, that code will run only if ship/receive.
    > I wanted to know where it decides to get rid of it. Some mates also told me you have to receive & invoice from the order screen otherwise it won´t get rid of it (if you invoice shipment/receipt won´t work)
    > Maybe I´m mistaken.
    >
    > thanks.


    The fully invoiced order is deleted when it’s posted from the sales order page.
    If you invoice through the combined posting function, then you are correct, the order remains. But NAV has a standard report that deletes full invoiced orders, report 399 “delete completely invoiced orders”


    I just wanted to know where it decides to delete order if invoice and receive from order, where in the code triggers. I know about that report.

    At the end I had to call that report with order number, find out from invoice receipt and pass to it and let it decide if it´s time to delete.
    This is all controlled in Codeunit 80. Depending on the version you are using, either in the "code" function or as a seperate function called DeleteAfterPosting


    there is not such function.
Sign In or Register to comment.