Today, I would like to share a resolution to an error message when using Integration Manager to import records into Sales Order Processing. Recently, I was working with a customer who was trying to import sales invoices into Microsoft Dynamics GP, but the integration was failing with an error on one document: “ERROR: Document cannot be edited, it is being edited by another user.”
These types of errors usually point to temp records being stuck in one of the temp tables…
SELECT * FROM DYNAMICS..ACTIVITY
SELECT * FROM DYNAMICS..SY00800
SELECT * FROM DYNAMICS..SY00801
SELECT * FROM TEMPDB..DEX_LOCK
SELECT * FROM TEMPDB..DEX_SESSION
…where the resolution is to delete those tables after having all users exit the system.
DELETE DYNAMICS..ACTIVITY
DELETE DYNAMICS..SY00800
DELETE DYNAMICS..SY00801
DELETE TEMPDB..DEX_LOCK
DELETE TEMPDB..DEX_SESSION
However, Integration Manager does not create a record in those tables when importing. After researching this issue further, we compared the record it was failing on (record #137) with what invoice that record is in the integration file. Once we found the invoice number, I did a select statement on the table into which the integration was inserting data (SOP10100):
SELECT * FROM SOP10100 WHERE DOCNUMB = ‘xxxx’
I replaced the xxxx with the document number of the sales invoice in question. I found a half created record in that table with this document number. This damaged record is what was causing the error. I deleted the damaged record and then ran Check Links on the Sales Work Logical table:
The Check Links report showed that it removed the keys record for this damaged record. Afterwards, we were able to run the Integration without error.
For additional resolutions, tips, and tricks regarding Dynamics GP and other ERP products, visit our blog.