SSI - "Document associated with multiple ERP records" error occurs on Entry Complete action
Summary
Applies To
- Self Service Invoice
- ERP System : Oracle
- MarkView Versions: 7.x
Behavior
When taking the Non-PO Invoice Entry Complete action on an invoice created via SSI, the following error message is displayed: 'The Markview Document is associated with multiple ERP records. Taking the complete Entry action is not allowed.'
Cause
There is a conflict between the MarkView Document ID and the MarkView Folder ID: MarkView is trying to create a document with a document_id value that already exists as a folder_id value. There is a query in mverp_attach_util_ext.getAttachmentEntityCount that pulls up an attachment count based on this ID. If it finds more than 1 row returned it throws the error.
Resolution
The error will no longer occur if the document_id value is greater than the highest folder_id, and the error only occurs on SSI documents. Therefore, the workaround is to create a non-SSI document, thus increasing the document_id sequence to a value higher than the folder_id sequence. Documents are created much more rapidly than folders, so the problem should not occur again later on.