A client ran into this last week and I thought it would be a good topic for a #TipTuesday blog post. The scenario is specific to users with both the Canadian Payroll (CPY) module and the Human Resources (HR) module in Microsoft Dynamics GP. This only will apply if HR is installed, so for those with just Canadian Payroll, and no HR module, it won't be relevant!

Incomplete paycodes warning message

Users may get this warning message when opening the Benefit Paycodes or Deduction Paycodes window in the CPY module.

Warning message: "There are benefit/deduction paycodes that are still incomplete. Please finish setting them up. Do you wish to print a report of these codes?
Warning message "There are benefit/deduction paycodes that are still incomplete."

It's annoying, but the warning exists for a reason: if a company wants to use the HR module to manage benefits, this could be a valid reminder that some step was missed when adding a new benefit or deduction paycode. If the items triggering the warning are codes that should not be set up in HR, keep reading!

Background on the HR-CPY integration

There is a built-in integration between the HR benefits setup and the CPY benefits & deductions setup where the option exists for companies to manage payroll benefits on the HR side, and push codes and rates down to the CPY side for payroll processing.

Why would a company want to use this?

Several employee or employer-offered benefits have a more complex rate calculation than what Canadian Payroll can manage. Some benefits are based on a combination of factors such as the employee's gender, or whether they are a smoker. Some benefits are based on a factor of the employee's income, like Life Insurance options for coverage based on 2 times an employee's salary as an example. Neither of these scenarios is easy to manage in Canadian Payroll alone unless the company wants to get into setting up a lot of different paycodes for the various combinations OR managing rate changes one employee at a time when benefit rates change.

How this all works is not the subject of this post, but in many scenarios, if HR is installed, it might be easier to manage the benefits in HR and allow it to sync down to CPY as changes are made.

How to remove the message

Even if an organization is using HR with CPY to manage benefits, this message can be irritating and a useless distraction for users. For clients who don't have the complexity to need an integration of benefit functionality but still want to utilize the other features of the HR module, it would be doubly annoying.

The data that triggers that message is located in the CPY80030 table. Removing the message is as easy as removing the records where there is no plan to use HR to manage a particular benefit or deduction. Here is what the table looks like when there is a mix of both valid HR and CPY benefits.

SQL query result shows a list of CPY codes, some with and some without a corresponding HR code.
SQL result of "SELECT * FROM CPY80030".

The column on the left is the CPY benefit or deduction code, and the P_HR_Paycode column shows several (blurred) lines where there is a corresponding HR benefit associated with it, and those records have a P_Integration_Status of 1 ("valid/complete"). All the other rows without a P_HR_Paycode show a status of 2 ("incomplete").

The script I use to clear out the "incompletes" is this, which is only deleting records that have an integration status of 2 ("incomplete"). If HR is used, the records with an integration status of 1 should not be removed!

WHERE  P_Integration_Status = 2

How do records get added to that table?

Every time a new Benefit or Deduction paycode is added to Canadian Payroll, the user adding the code will be prompted with this message below. Here's the rub: it doesn't matter if the user chooses Yes or No to this message, either way, a new "incomplete" record will be added to the CPY80030 table.

System message: "Do you want to set up the corresponding codes in Human Resources to complete the integration?"
The prompt says "Do you want to set up the corresponding codes in Human Resources to complete the integration?".

Here is what the CPY80030 table looks like after adding this new Benefit paycode AND choosing No to this message. The query below is after cleaning out incomplete records, and "selecting" only those with an incomplete status. For most companies, new benefits and deduction codes would not be frequently added but when they are, this issue will pop up again until the table is cleared of the incomplete records.

The result of the SQL query shows the newly added TEST benefit code in the table is incomplete.
The result of the SQL query shows the newly added TEST benefit code in the table is incomplete.


In summary, this warning message can be "removed" by clearing out the CPY80030 table of any incomplete records, but it might return if a new benefit or deduction code is created at some point after doing that. Be cautious with running any scripts, I always recommend running it in a test company or test environment first to make sure the results are as expected.