How are Payables transactions work error messages stored?

This question came up in the Dynamics GP Partner forum a few days ago, the specifics inquiried by the consultant were as follow:

"I was just looking at the PM10000 table in SQL Server Management Studio. I found a column named PMWRKMSG, with a data type of binary(4), which I cannot understand. In addition, I found entries like, 0x00019000, 0x00009000, 0x00000000 as column values. I know that they represent error messages, generated on the Batch Edit List and Posting Journals, but how can I check which message is being generated by just looking at this column? Do I need to convert this entry to some other integer and refer to some other table, which in turn would have a list of all the error messages?"

Answer

The 'PM WORK Messages' field (PM10000.PMWRKMSG column) is a Dexterity multi-select listbox control (so are the 'PM WORK Messages 2' and the 'PM Distribution Messages' fields) which contains static texts. The only way of storing such controls (with the listbox values checked or unchecked) on SQL Server is by using a binary data type. During the posting process, a number of failed validation rules will trigger any of the 32 static text values -- added by the development team -- to be checked in the multi-select listbox control.

The static texts (and possible errors you may receive during posting) for the 'PM WORK Messages' multi-select listbox control are:


No vendor record exists for this vendor ID.
This vendor is inactive.
This transaction already has been posted.
Duplicate check numbers are not allowed.
Duplicate invoice numbers are not allowed.
No record exists for this credit card.
No unique voucher numbers are available.
This transaction has been posted and fully paid.
Distributions for this transaction contain errors.
Vendor summary records cannot be updated.
This transaction is recurring; it cannot include a payment amount.
This document should not be applied to other documents.
The total applied amount is incorrect.
Tax detail information is incorrect.
Vendor ID is on hold
Withholding Vendor ID is invalid
Applied record is on hold
Batch information is invalid
GL posting date is invalid
Fiscal period for the posting date does not exist
Fiscal period for the posting date is closed
Taxes Incorrectly Distributed
This transaction contains multicurrency error(s).
This transaction contains errors. It won't be posted.
Transaction Analysis information for this transaction is incorrect or missing.
Transaction contains intercompany distributions; mark as an IC transaction.
Intercompany Processing is not registered;cannot post intercompany transactions
The currency must be either the functional currency,
The currency must be the same as the currency assigned to the checkbook
the Euro currency,
an enabled denomination currency,
or the same as the currency assigned to the checkbook

Assuming the values follow a binary storage pattern, 0x00009000, can be converted to its decimal equivalent of 36,864. In turn, this number can be represented as 2^15 + 2^12. If is the case, the error messages displayed on the batch edit list are: "Withholding Vendor ID is invalid" and "The total applied amount is incorrect". In the case of 0x00019000, this is 2^16 + 2^15 + 2^12, this would result in the messages "Applied Record is on hold", "Withholding Vendor ID is invalid" and "The total applied amount is incorrect".

Of course, these errors can only be cleared via the interface, since resetting the value in SQL Server would have no direct effect on the validation rules applied by the posting process. A transaction will not move to the PM Transaction Open table (PM20000) if all the validation rules are not cleared, which in turn would render a value of 0x00000000 in the column.

The 'PM WORK Messages 2' multi-select listbox field stores the following static text values:


You cannot post to a tax date within a closed tax period.
You cannot post to a tax period that has not been set up.
The vendor's remit to address bank format is missing or inactive.
The bank format for the vendor and the checkbook must be the same country.
The bank format for the vendor and the checkbook must be different countries.
The bank format assigned to the checkbook is missing.
This check amount exceeds the maximum check amount for the checkbook.
Remit-To address doesn't exist; please enter a different address.

The above errors are mostly used during the validation of tax computations and vendors setup as EFT vendors.

The 'PM Distribution Messages' multi-select listbox field stores the following static text values:


The accounts payable distribution(s) does not equal the actual amount.
The purchases distribution(s) does not equal the actual amount.
The discount available distribution(s) does not equal the actual amount.
The trade discount distribution(s) does not equal the actual amount.
The discount taken distribution(s) does not equal the actual amount.
The misc distribution(s) does not equal the actual amount.
The freight distribution(s) does not equal the actual amount.
The tax distribution(s) does not equal the actual amount.
The cash distribution(s) does not equal the actual amount.
The write off distribution(s) does not equal the actual amount.
The other distribution(s) does not equal the actual amount.
The GST distribution(s) does not equal the actual amount.
The withholding distribution(s) does not equal the actual amount.
The debit distributions do not equal the credit distributions.
No account has been specified for one or more distributions.
The Realized Gain distribution(s) does not equal the actual amount.
The Realized Loss distribution(s) does not equal the actual amount.
The Round distribution(s) does not equal the actual amount.


Hope this helps in troubleshooting and understanding how Dynamics GP processes and manages errors when executing a Payables transaction posting validation.

Until next post!

MG.-
Mariano Gomez, MIS, MVP, MCP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/

Comments

RLMcVicar said…
Are you aware of a SQL script to help identify if a posting account is not setup that often causes Payables Transaction Posting Distribution errors?
Mariano Gomez said…
RL,

I am not aware of a specific script, but my buddy Michael Johnson wrote a VBA customization to do something similar in POP. Take a look at his post at http://mbsguru.blogspot.com/2009/12/vba-source-for-making-purchases-account.html

MG.-
PLM said…
Mariano, know this is an old post. Are you aware of a way to run a sql script pull out the actual message for example on the pm10000 table? Instead of having to print an edit list to display an error message like "fiscal period is closed". Want to query the unposted batches to display an error without having to run the edit list. Is that a hexadecimal conversion?

Thanks.
Mariano Gomez said…
PLM,

Unfortunately, the amount of work it would take to do something like this in SQL, it would probably be just faster to print the edit lists. Keep in mind the drop-down list values are not stored in SQL, just the position of the error messages selected.

Popular posts from this blog

DBMS: 12 Microsoft Dynamics GP: 0 error when updating to Microsoft Dynamics GP 2013 R2

Cannot insert the value NULL into column 'CONTACT' error when clicking on Items List in Navigation Pane

How to uninstall Microsoft Dynamics GP 10.0 if you cannot uninstall it by using the "Add or Remove Programs" feature