Dynamics GP – Error message “Unhandled script exception: SCRIPTS – data area” opening the Payables Enquiry window

I’m come across this error a few times so thought I’d document on my blog.

The user is presented with the below error when opening the “Enquiry > Purchasing > Transaction by Document” window in Dynamics GP

When the window does open there’s a blank record showing in the scrolling window:

When you expand the window and attempt to select it you are prompted with the message “The selected record has been deleted by another user” and it disappears from the window

In this particular instance the issue is being caused by an incorrect PM Keys Record in the PM00400 table.

If I search for an incomplete record in the PM00400 table using the SQL query below this returns one record:

SELECT * FROM PM00400 
WHERE VENDORID='' AND DCSTATUS=3 AND DOCNUMBR='' AND DOCTYPE=0

If I then remove this record using the DELETE statement below the error no longer occurs when I open the window

* Always ensure you have adequate backups prior to deleting data from SQL

DELETE FROM PM00400 
WHERE VENDORID='' AND DCSTATUS=3 AND DOCNUMBR='' AND DOCTYPE=0

Please note you could also delete the entire contents of the PM00400 table and have the system recreate it using checklinks however this isn’t practical in my case.

I hope this helps anyone who encounters this issue in future.

Thanks for reading!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s