Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Deleting Payroll Codes: Benefit, Deduction & Pay Codes

Posted on by 150

Is there a global way to remove codes from employee record so they can be deleted?  The only documentation I have found  says to remove each code individually from each employee record first then delete the code.  That would be an extremely cumbersome process because we have 125 employees, and numerous codes of each type in each employee record that need to be removed.  Is there another way?

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    The quickest way i found to do this is via macro. If you have the list of employee ids and the list of the deductions, paycodes or benefits that you want to remove, simply out them in a list in  tab delimited file.

    Next create a macro deleting a record and using the mail merge create the macro file. 

    Once macro file is created, it will zip thru each record and udpate.

    Overall it may take 20 - 25 mins to create the macros and setup files etc. but it sure beats spending an hour of monotonous typing of employee ids and manually updating each record.

  • Suggested answer
    Jason Rasmussen Profile Picture
    Jason Rasmussen 5 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Generally, Employee Class ID setup is the place to make sweeping changes. When changing the Class ID defaults, GP will ask you if you want to roll down the changes.

  • Countessa Profile Picture
    Countessa 150 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Mr. Lowther,

    Your reply and the time you have spent to answer my question is greatly appreciated.  Your approach to my question is a learning exercise in itself and not wasted - thank you!  

    You have successfully convinced me with caution and warnings that there is a good reason why a global delete is not a menu option built into the software.  I will take your advice and go through the employee record to remove unneeded codes before attempting to remove any of them in set up,  even then doing so with great caution considering the reasoning you have given.

    Good day,

    Countessa

  • Suggested answer
    John Lowther Profile Picture
    John Lowther 5,122 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Hey Countessa,

    First, I wish to re-state I really would not do this from SQL, go through the Interface. Not only do you have to worry about if there are any current year transactions for the employees to remove the code from the employee, but you have to worry about previous year(s) transactions for the code that may have unpredicatable BAD effects if you just delete them. By going through the interface there is a lot of background checking that determines if it is ok to delete that code. By using SQL you are skipping all of those checks and balances.

    Now with that being said. First setup a TEST system. Not a test company an entire test system. Separate SQL Server, separate client everything. And do lots of testing on removing these codes in test before doing anything in production. Include things like reprinting old reports for previous years, etc. Also, check into how Reconcile and Check Links work as you are talking about removing detail records that these utilities need, especially Reconcile.

    Check out these Blog Posts that contain code on searching the entire database located here written by Jivtesh and this one here that I wrote myself. Note: As the scripts were written with two different ideas in mind I would actually suggest running both of them and cross referencing the results. 

    By using these scripts you can get a list of every table in the database that contains a specific value like one of your Payroll Codes. And then do as you wish.

    However, I wish to point out (yes, once again).

    The most I would do, if it were me, is to set the field "INACTIVE" to a value of "1" for the codes you want to get rid of in the following tables.
    UPR00400 -- This is the list of pay codes for a specific employee
    UPR00500 -- This is the list of Deductions for a specific employee
    UPR00600 -- This is the list of Benefits for a specific employee

    Once I had done that (notice that was update not delete) then I would go into the master setup for each of those codes using the Dynamics GP Interface and on the master setup screen for each code mark the code itself as inactive. Again this is just an update not a delete. Additionally, check any Class, Department, Positions, or other Setup items that contain a list of Payroll Codes defaults and remove them from the lists.

    At this point when you are assigning Payroll Codes to an Employee, if you use the Active codes only view then you should not even see these codes at all. And just leave the codes in your database as old deactive codes. I woud really never actually delete them.

    Also, the tables I memtioned are only the Payroll Tables, it does not take into accout the Human Resources(HR) side of things at all. If you are using HR then there are a lot other tables that get involved.

    Let me know if this helps and feel free to contact me if you wish.

     

  • Suggested answer
    John Lowther Profile Picture
    John Lowther 5,122 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Hey Countessa,

    If you are sure the codes have not been used in over two years, please give me a little while and I will see if I can dig something up that can help you out.

    Or maybe someone more knowledgeable than me may have an answer.

    till I finish digging,

  • Countessa Profile Picture
    Countessa 150 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Thank you for taking the time to reply John.  However, these are codes that have not been used for at least two years and they are just clogging up our existing list.

  • Suggested answer
    John Lowther Profile Picture
    John Lowther 5,122 on at
    Re: Deleting Payroll Codes: Benefit, Deduction & Pay Codes

    Hum, this can get really bad really fast. As far as I know there is now way to delete Payroll Codes (Pay, Benefit, Deduction) in mass. It has to be done at the employee level first.

    Now while you may have a DBA that could go into the Database and do it I would EXTREMELY advise against it! Do Not Do that!

    Here is my reasoning; if any employee has a transaction for a Payroll Code at any point during the year then that code cannot be removed from the employee until after the Year-End process otherwise the W2's would be hopelessly incorrect.

    Thus while it takes a while to do I would follow the documentation and remove each code from each individual employee and then delete the code. It is during the process of removing the code from the employees that Dynamics GP checks to see if there are any transactions for the current year.

    Hope this clears things up, and let me know how it goes.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans