You receive "Unhandled Script Exception: Invalid Product ID 258" when attempting drill-down into an invoice from Purchasing All-In-One view

Just recently, I was helping someone on a forum with a question regarding the Purchasing All-In-One view. The consultant could not get the view to show the receipts and invoices for some vendor POs. In order to assist with the issue, I had to try and recreate the issue myself. Needless to say, I could not recreate the specific problem reported by the consultant. However, in an attempt to drill-down on a specific invoice voucher, I received the following error message:

Unhandled script exception:
Invalid Product ID 258.

EXCEPTION_CLASS_SCRIPT_OUT_OF_RANGE
SCRIPT_CMD_CALL




Product 258 corresponds to Project Accounting. Suffice to say, there isn't any validation in place to determine if the Project Accounting dictionary is present, before attempting to display the invoice. The workaround, of course, is to install Project Accounting even if you don't need it, until a fix is in place from Microsoft.

This issue is present in Microsoft Dynamics GP 2015 R2 YE (14.00.1016) and Microsoft Dynamics GP 2016 RTM (16.00.0404). I have not tested GP 2016 R2, but see no specific reason to believe this is been fixed, given the fact that this condition only occurs if Project Accounting is not installed.


Until next post!

MG.-
Mariano Gomez, MVP

Comments

Paul Johnson said…
It appears the workaround for this issue is to turn project accounting on in registration and then to turn if back off. Error then goes away when drilling into invoices.
Lisa Williams said…
Thanks, Mariano. Exactly the information I was looking for. You rock, Sir!

Best,
Lisa Williams
Mariano Gomez said…
Paul,

Thanks for the update! Will keep this one in the toolbox :-)

MG.-
Unknown said…
I can confirm this is still a problem in GP 2016 R2.
Unknown said…
I can confirm the problem still exists on GP2016R2 and the workaround still resolves the issue.
Anonymous said…
There is nothing that needs to be fixed around this, typically what it is happening is that PA is marked in the registration window, but you do not have PA installed. If PA is NOT installed then UNMARK it in the registration window.
Thanks
Terry Heley
Microsoft

Mariano Gomez said…
Terry,
This IS a problem that could be handled better with a simple line of code that checks if the PA dictionary is installed:

if (Launch_GetProdPosition(258) > 0) and ('Module Registered'[5] of globals) then
{ your PA call here}
end if;

MG.-
Mariano Gomez, MVP

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