Skip to main content

For those who are unaware, there is a new archiving feature in 2023 R1.  This feature, currently limited to Sales Orders and Shipments, allows users to manually or as a scheduled process set documents as ‘archived’ in the system according to a configured time horizon.  The documents once archived are not deleted, but are labeled as archived.  The purpose of this new feature is to increase performance and not to decrease database size. 

“..Archived documents are not included in the results of database queries executed during regular activities, such as opening generic inquiries, lookup tables, or tabs that load a list of records.  As a result data retrieval performance improves.”  -- Acumatica ERP Administration

As an ISV developer, my team investigated this new feature to determine if our code would be affected.  Interestingly, we found that the logic that governs this feature is at a lower abstraction level than our code.  We discovered that once archived, our PXSelect statements no longer retrieved archived Sales Orders or Shipments. 

Two new columns have been added GotReadyForArchiveAt and DatabaseRecordStatus to the affected tables/DACs.  The first field, a Datetime, lists the date when the document can become archived and the second field DatabaseRecordStatus is a bool that dictates if the document is archived or not.  Once a document is ‘complete’ the GotReadyForArchiveAt date can be set with the current date.  Then when the appropriate time frame has completed, the document can be set to archived.  See the documentation for how to setup and archive data.  The interesting thing is that because of the way this is done, this feature can be applied to DACs outside of the SO and Shipment DACS.  To test this theory, I added the above fields to a custom DAC in my customization, set them both so that my records would read as archived and sure enough the UI did not retrieve them.  My guess is that this mechanism would work universally.

When considering the archiving needs of our own software, it was tempting to utilize this feature.  The question becomes if the data you are archiving would be better marked as ‘obsolete’ or just deleted.

Thank you for sharing this with the community @Patrick Chen!


@Patrick Chen - Thanks for this!! I was just looking into this to see if it would be simple enough to customize to add an Sales Order Type selection so we’re not archiving all sales orders. From what you’re saying, it looks like we’ll be able to. 

We want to be able to archive a single sales order type because of retail Shopify orders that have a dedicated order type, but exclude all other order types.  Currently we can’t because it’s all or nothing. It’s also good to know we’re not bound to only sales order and shipment documents!  


@jamesh  Adding the Sales Order Type to the Archiving Process would have been such a good idea!


@Patrick Chen 

Thank you Patrick! Not long ago I heard that those records that were marked archived will eventually be part of a different database partition which will increase the performance even more. 


Reply