When you open a purchase order in the Purchase Order Entry window in Microsoft Dynamics GP, you receive the following error message:

Unhandled script exception:
Value of range.




This problem occurs if the POTYPE value in either of the following tables is set to 0:

• The POP10100 table
• The POP10110 table

Microsoft Dynamics GP cannot read this value because the only possible POTYPE values are as follows:

• 1 = Standard
• 2 = Drop-ship
• 3 = Blanket
• 4 = Drop-ship blanket

Note This problem typically occurs if the purchase order is imported into Microsoft Dynamics GP.


To resolve this problem, update the POTYPE value to a valid number. To do this, follow these steps.

Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.


Run the following statements against the company database in SQL Query Analyzer. To start SQL Query Analyzer, click Start , point to Programs , point to Microsoft SQL Server , and then click Query Analyzer . /*PO Header - work*/ Select * from POP10100 where POTYPE = 0 /*PO Line - work */ Select * from POP10110 where POTYPE = 0 Note This script flags all the purchase orders that have a POTYPE value of 0.


Run the following statements against the company database in SQL Query Analyzer. /*PO Header - work*/ Select * from POP10100 where PONUMBER = 'purchase order number' /*PO Line - work*/ Select * from POP10110 where PONUMBER = 'purchase order number'


• This script flags the specific purchase order number that is experiencing the problem.
• Replace


If the POTYPE value is set to zero, update the POTYPE value. To do this, run the following statements against the company database in SQL Query Analyzer. Update POP10100 set POTYPE = POTYPE value where DEX_ROW_ID = DEX_ROW_ID number


• If the POTYPE value is not set to zero, you can copy the POTYPE value from the Purchase Order Line table (POP10110). Make sure that you set the POTYPE value to the correct value. The possible values are listed in the "Cause" section. You may receive more error messages if the POTYPE values in the POP10100 table and in the POP10110 table do not match.
• Replace


Log on to Microsoft Dynamics GP by using the sa user account. Then, perform the Check Links procedure on the purchasing transactions in Purchasing in Microsoft Dynamics GP. To do this, follow these steps:


Click File , point to Maintenance , and then click Check Links .


In the Series list, click Purchasing .


Click Purchasing Transactions , click Insert , and then click OK .


Click to select the Screen check box, and then click OK .


Verify that you do not receive the error message that is shown in the "Symptoms" section.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!