>In the past days I had been helping a Microsoft partner and good friend of mine in migrating some Modifier with VBA customizations from Microsoft Dynamics GP version 9.0 to version 2010. In doing so, we came across an issue with one of the modified objects that needed to be converted: the Inventory module’s View Indented Bill window.
|View Indented Bill window – Original|
The customization in question added a field to the View Indented Bill window to retrieve the quantity available for a given component item on a bill, as shown below:
|View Indented Bill window – Modified|
The rest of the customization included adding some VBA code to retrieve the quantity available for the component across all sites by using some simple ADO code. So far, good!
The error came into play when we attempted to print the Indented Bill Report, by clicking on the print button on the window.
|Unhandled script exception error|
After selecting the report type on the destination on the Report Destination window and clicking Ok to generate the actual report, Microsoft Dynamics GP was complaining about an Unhandled script exception an its inability to find script PrintTraverseCallback of form “[Not Found]”.
As every good developer would know, troubleshooting this issue meant:
a) Testing that the error did not happen with the original form. Checked!
b) Testing that modifying the form did not corrupt the forms dictionary file, FORMS.DIC. Not Checked!
c) Testing that adding VBA code did not introduce the error, Not Checked!
In cases b) and c) even after rebuilding the forms dictionary and removing the VBA code, the error still occurred, but for case a) the system printed the report without presenting the Unhandled script exception error.
So being the, ehem!, well connected guy I am, I decided to call my good friend [Name excluded to protect the innocent] over at Microsoft. A test was performed to modify the same window and grant security to the modified version of the window, then run the report. The results were the same – Unhandled script exception. Now I could confirm that this was in effect a bug.
The bug also causes the BM Bill of Materials report would also not print the indented bill as expected.
|BM Bill of Materials printed from original View Indented Bill window|
Now, here is the report printed from the modified window.
|BM Bill of Materials printed from the modified View Indented Bill window|
Consequently, a problem report has been written up for this to be addressed in the near future – hopefully quick enough for the affected client.
Until next post!
Mariano Gomez, MVP