When running the Purchase Order Transactions list out of Dynamics GP, I attempted to select all items and received the following error:
Unhandled script exception:
Index 0 of array ‘[Not Found]’ is out of range in script ‘TrackMarkedDocuments’. Script terminated.
I hadn’t seen this error mentioned on any blogs, so thought I would share the solution here. The issue is that the company has PO’s with a status of “0” in SQL tables, which is invalid.
In order to identify the offending PO’s, try running the following script against the company database where the error is popping up.
select * from POP10100 where POSTATUS=0
This will return a list of PO’s with the invalid status. If you can ensure that the PO’s are no longer needed, you will need to run a script to delete the PO from POP10100 (Purchase Order Work) and POP10110 (Purchase Order Line), as well as any other tables containing the PO. For example:
delete POP10100 where PONUMBER=’po7002′
delete POP10110 where PONUMBER=’po7002′
Now, try running your list again and it should run without error, as long as the PO has been removed from all tables that contained it.
Contact Mari Pohlman for more information about resolving this issue (email@example.com).