How to archive and purge fully invoiced Purchase Orders in NAV 2009

We are using NAV 2009 R2. Our purchasing agents have been using the “get receipt lines” functionality rather than invoicing from the PO for some time now (see user comments at the bottom of the post to see how they are invoicing purchase orders). My understanding is when you invoice in this way, the system does not Auto-purge the purchase order as it would if you were invoicing from the PO. Because you are not on the Purchase Order itself, you are also not giving the agent an good stopping point to archive the PO before invoicing. These old fully invoiced purchase orders are now clogging up drop-down lists and generally making day-to-day work in the purchasing system difficult and clumsy. We are searching for a way to archive and purge in mass.

Under “IT Administration/Data Deletion/Purchase Documents” we have found a number of utilities such as “Delete Invoiced Purchase Orders”. Problem is there does not appear to be an “Archive before Purge” option. The tool simply deletes the purchase orders that qualify.

Q: How can we purge, making sure the final state of the PO has been first archived? I have not found a BULK archive utility we could possibly run before the purge. We do have developers on staff that may be able create a customized process, but before we spend time/money on this, I wanted to be sure I wasn’t missing something obvious and easy.

Please help! :slight_smile:


User Comment below:

Usually when I post a PO from the PO the PO will disappear from the system. But I have learned a new way to post a PO by going to Purchase-Order Processing-Invoices. Then I create a new invoice and pull in the receipt lines from PO by functions get receipt lines. After I post it, the PO does not go away like it use to do in the regular posting from the actual PO. Is the only way to make it go away is to archive the PO and delete it?

The term ARCHIVE in Navision language has slightly different meaning as you might expect - hence there is no “bulk archive”.
Archiving means saving several variants of the same Order - say, you negotiate amounts, prices, substitute merchandise available sooner and so on. It looks like one order, but if one (or several) versions is archived, you can easily restore back any of the intermediate archive versions.

Why you are willing to keep fully processed Orders? They only take up DB space, that for exists all those DataDeletion tasks to get rid of them. The ONLY allowed usage of Posted Documents is the rare need to reprint one - you can NOT build any reports on them, especially for costing data as these are NOT accurate. All the reporting must be done based on Ledgers instead.

I could come with just as many good reasons for keeping at least the last copy of a fully delivered purchase order, especially in a setup where it’s not posted via the order, but via “get receipt lines”. Being able to check the actual order, being just one.
So its the key here is to know why does your company [mention:ffb0e63750d744b2b5617b3db50623b2:e9ed411860ed4f2ba0265705b8793d05] need it? Because yes, as Modris say, then it takes up a lot of space, if they are not really needed.


Thanks for your response. I myself am new to NAV (I am in the IT department) and am unfamiliar with WHY some features are the way they are. I myself come from an ERP environment where it is actually difficult to delete orders. NAV’s default behavior of deleting a PO once is fully invoice is quite foreign to me.

How do most “sensible” companies use the archive feature in NAV? Is the primary INTENT of the feature meant to allow savable changes states while working an order only? What is considered BEST PRACTICE? Is it sensible to delete all copies/states of the original purchase order?

I would love to free up disk space by doing a complete purge of the older POs but I will probably need to convince users this is in their best interest.

Thanks again for you quick response.


Well, in fact, NAV does NOT delete Orders - they are moved to Posted Receipts/Shipments and Posted Invoices. This is done exactly for the reason you mentioned - not to clog up Orders List with completed transactions.

Hi Terry,
One of the most “wonderful” things about working with ERP implementation is that no two companies are alike. What is normal in one kind of business, is quite uncommon in others. There’s really no best practice that covers everyone.

You can look at this from to sides. 1) The legal requirements. 2) Business requirements.

In most businesses there are no legal requirement to save the actual order document. At least not after the order has been invoiced. Then the invoice is what carries the transaction. In an ERP system the posted transactions are the most important data. But even the actual posted invoice can be deleted, as soon as it has been printed at least once. Something that comes to a surprise for most customers. But the only thing you cannot delete in NAV is basically the posted transactions (g/l entries, customer and ledger entries, item ledger entries etc.). Everything else is just supporting data, so to say, and not required by law.

So it’s really the business’ individual requirements it comes down to. As I wrote above, then I could see good reasons, why a company would like to keep the latest version of a posted purchase order, in a situation where they are invoiced the way you do. And with the current GB storage price, that’s normally not really important, if it contains data the company still needs. In theory you could still “reconstruct” most of the purchase order information, if you collected the information from the transaction tables.

Personally in my 20 years working with NAV in 100’s of businesses, I have never had a customer with this requirement. The few who were using this functionality, didn’t need it after invoicing. That doesn’t mean your company isn’t different.

And if they are, then the only thing you need to do, is to make the archive functionality run automatically, before posting the purchase invoice. A small job for a developer.


So what exactly does the utility “Delete Invoiced Purchase orders” do? Does not DELETE as the name implies, or does it MOVE to Posted Receipts/Shipments and Posted Invoices?

If it only moves (and perhaps changes where and how you look up older orders), it may be easier to sell to the end users. We may need some user training but that can be accomplished.

Thanks again for your response.

NAV does delete orders with this job!

When using the “normal” (again there is no normal when it comes to this) way, then if the order has been fully received, then it deletes the order.

If done using “get received lines”, then you must use the job to delete the fully received orders.

This functionality is the same for purchase and sales, like most of the purchase and sales functionality.

The posted receipts are created when you post the receipt from the purchase order and will only contain lines from that order.

The posted invoices on the other hand are created with a link primary to the posted receipt, not the purchase order.

You guys are both quicker with the answers than I am with the questions! Awesome feedback and GREATLY APPRECIATED!

I would think our primary business need would be from a functional day-to-day perspective of a purchasing agent.

Q: What did I order last time I ordered from vendor “ABC”?

Being unable to pull up “PO12345” for vendor “ABC” and SEE what was ordered last year is easier than going though ledger transactions (which I might not have access to). That is the reason I was focused on how to ARCHIVE (at least the last state) of a purchase order before blowing it away.

I would probably be best served with spending time in test, deleting purchase orders with the utilities provided, and reviewing the outcome with the users.

I think you both have answered the question of “have I missed something obvious” when looking for an archive utility. It really comes down to how you want to run your business and how much detail we NEED to keep.

Thanks Again!


You’re welcome. You American’s should just be happy that you’re that many hours behind Europe. Most of our members are online here in their spare time, so we are doing this with our evening coffee and the news in the TV. Normally you shouldn’t expect that fast a reply. :wink:

If your purchase agents are in the situation, that they need to be able to pull up the last purchase when they are creating the new purchase order doesn’t sound right to me. Why not use the build-in restocking features that automatically create purchase orders? Sure it can take some time to setup and fine tune, but then NAV does a really good job. Again, not for every type of business. For sales orders, more reasons.

And correct, nobody would like to go though ledger entries. They would use some of the standard item purchase statistics. :slight_smile:

I think that I would consider create a small change to the “delete purchase order” function. I would add the “archive feature” here, so that you can make sure that you have at least that one archived version, before it then deletes it. That is, if they actually needs it.

They could indeed get the same information, just by looking at the most recent posted receipts. They are not deleted automatically.