On a recent screen share with a client, we discovered script errors when the client was trying to open the payables document inquiry window. The message the client was receiving was below:
Unhandled script exception:
Index 0 of array 'PM Transaction Abbreviation' is out of range in
script 'PM_Transaction_Inquiry_Scroll_FILL'. Script Terminated.
The message appeared twice before disappearing and the records appeared in the window. When they did, I noticed two blank historical records showing up in the first two lines. There were two broken records in the PM00400 table of GP.
Here are the steps I took to fix this. Before you start, make sure you take a backup of your company database in question.
Unhandled script exception:
Index 0 of array 'PM Transaction Abbreviation' is out of range in
script 'PM_Transaction_Inquiry_Scroll_FILL'. Script Terminated.
The message appeared twice before disappearing and the records appeared in the window. When they did, I noticed two blank historical records showing up in the first two lines. There were two broken records in the PM00400 table of GP.
Here are the steps I took to fix this. Before you start, make sure you take a backup of your company database in question.
- Run check links on the payables transaction logical files
- Check to see if this has resolved your issue
- If not, sort the PM00400 by CNTRLNUM and check if any blank records exist in PM00400.
Select * from PM00400 Order by CNTRLNUM= ‘ ‘ - If blank records exist- delete them.
Delete from PM00400 where CNTRLNUM= ‘ ‘ - Close the inquiry window that was in question. Open the window and you should be good to go!