Purge Utility vs SQL Deletion: AR History

Hello, 

We are looking to remove some data from the "Customer Maintenance" screen as some customers take roughly 30 seconds to load all of their history. I am specifically talking about records under  tab 6 "Invoices", and tab 7 "Transactions".

I am curious as to what the difference between using the purge utility and manually deleting records through SQL is? For example, what all tables is data deleted from? This process if part of a larger project where we are including a button on the panel that links to an external document that has all this information backed up (which is already set up).

Also, I noticed under the purge utility that there is a tab "Fiscal Year to Remove History By." Is it safe to assume that this year means all records including and before that year, or only that year? 

Thanks!

  • 0

    The number of records on the Customer Maintenance - Invoices tab is based on the "number of days to retain paid invoices" setting in A/R Options.  This data is stored in the AR_OpenInvoice table.  I would not use SQL to purge data from this table; however, you may want to consider lowering the current number of days to retain paid invoices setting.  Of course, the data is purged automatically when you run A/R Period End Processing, based on the number of days setting.

    Less records in the AR_OpenInvoice table could potentially increase the speed of load time on the Transactions tab.  Best way to find out is to make a test company and try your changes in that company first.

  • 0

    Brian is correct! I will also add that since you're on Premium to make sure you have a Database Maintenance Plan that runs unattended every so often to at least do the following for all the MAS_xxx and MAS_System databases:


    * Check Database Integrity
    * Rebuild or Reorganize indexes (or run Agent Job to run script to Drop and re-Create indexes)
    * Update Statistics
    * Sends you an email if errors running these tasks (after setting up SQL Database Mail)

    The Maintenance Plan may not solve the 30 sec load issue but it is a good practice for an index intensive app like Sage 100.

  • 0 in reply to BShockley

    We have invoices showing from 11/4/2013, and our "days to retain paid invoices" is set to 750. 

  • 0 in reply to Surya IT

    The settings is based on the payment date.  For example, based on your "750 days" setting, invoices paid on or after 5/1/2017 will be in the AR_OpenInvoice table.  Are you running A/R Period End Processing every month?  If you're not running period end processing, the paid invoices will not purge from the table after 750 days from the payment date.