Mass Vendor Inactivation Script
Every year after we install the year end update we then set about cleaning up our Dynamics GP environment by inactivating vendors and customers who we haven’t interacted with in the previous 12 months. It helps keep users from accidently choosing wrong customer or vendor when entering transactions, and it also helps reduce data sprawl. So without further distraction here is the script I run to inactivate vendors in Dynamics GP.
The script checks to see all vendors who last had a check issued 12 months back and the last purchase date falls within 12 months as well. The script also checks to ensure the vendors are active and have a current balance of $0.00. If you want to change the date ranges simply modify them in the WHERE clause at the bottom.
*AS ALWAYS run this against a dev environment first to be exactly sure of how this will affect your data.
--UPDATE PM00200 SET VENDSTTS=2 WHERE PM00200.VENDORID IN (SELECT PM00200.VENDORID FROM PM00200 INNER JOIN PM00201 ON PM00200.VENDORID = PM00201.VENDORID WHERE PM00201.LSTCHKDT<'2013-12-31' AND PM00201.LSTPURDT<'2013-12-31' AND PM00200.VENDSTTS=1 AND PM00201.CURRBLNC=0)
*This post is locked for comments