Monday, February 13, 2017

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.


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!

Mariano Gomez, MVP


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!

Lisa Williams

Mariano Gomez said...


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


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.
Terry Heley

Mariano Gomez said...

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;

Mariano Gomez, MVP