16 August, 2010

Deleting Empty SOP Batches Made Easy

I took a support call recently in which a client explained that they had accumulated hundreds of empty SOP Batches that they wanted to delete.  In response, I produced a simple proc that will scroll through the "Sales Entry" Batches and, like Check Links on Sales Work, will update the Number of Transactions and Batch Total on each.  This proc goes one step further and deletes any Batches for which the Number of Transactions is 0.  Of course, there are many reasons why you might want to keep some of your Batches even though they are empty so this might not be for everyone.

If this sounds like something that would be useful to you, feel free to download the proc here, load it on your GP company database, and then simply run the following to execute it:

EXEC [dbo].[SACi_sp_GP_SOP_Batch_Cleanup] 'Sales Entry'

You could schedule a SQL job and run this to clean up your SOP Batches periodically or add a push button to a form in GP for ad-hoc execution from within the application.

This blog is provided "AS IS" with no warranties, and confers no rights.

1 comment:

Anonymous said...

This is great, I was just tasked to do this. Perfect!