I know that this is an old thread and may have been answered in another question - but to those that find this thread here is the answer to this matter ( at least what worked for me )
In my case - and it appears in the ones above - the user could not open a specific Cash Reciept and so when I was confirming this I completed the following steps in Microsoft Dynamics GP
1. Ensure all users are logged out of GP
2. Log in as SA
3. Open Sales >> Transactions >> Cash Receipts
4. Enter the Receipt number ( that is apparently stuck )
5. Should get the same error message - reason for this is to determine if logging out of users does not free up the document.
Open SQL Server Management Studio and
Make a Backup of the Dynamics DB and the Company DB
Open a new Query window to do the following:
select * from RM00401 where DOCNMBER = '<receipt number>'
- Looking into the Company.RM00401 - RM Keys File
- for the document that you can not open - make a note of the Dex_Row_ID
select * from RM10201 where DOCNMBER = '<receipt number>'
- Look into the Company.RM10201 - Distribution Work and Open
- for the same document - make a note of the DEX_Row_ID
Now in my case, and the one above the Document was partly created in the RM Keys and the RM Distribution Work and Open. If the Document does not show in the RM10201 replace it with the RM10201 and note the Dex_Row_ID as it may be the header that exists and the missing section would be the distribution.
Final step is to remove the partial documents from the RM00401 and RM10201
delete from RM00401 where DOCNMBER = '<receipt number>' and the Dex_Row_ID = <found above>
delete from RM10201 where DOCNMBER = '<receipt number>' and the Dex_Row_ID = <found above>
After this you may need to re-open the Sales >> Transaction >> Cash Reciept window and enter the Document ID, and click on DELETE from the menu bar. This was the final step I needed to remove any reference from the system of that document. After doing this we were able to re-enter the document ( same ID ) and select the various APPLY to documents with no further error.
Hope this helps anyone else.