The message "Unable to remove this transaction: an open apply record exists or an apply record exists outside the selected range."  is hard-coded in the header section of the Transaction History Removal Report, so it will never go away.   

The message is preceded by an asterisk, so it only applies to any document listed in the bottom section of the report that is also preceded by an asterisk.   If documents are listed in the bottom section of the report without an asterisk, then the system will remove these documents from history.   If an asterisk precedes the document, then you must check the following:

1.  Is the document fully applied and in history?  If the document is in open status and partially applied, the system will not let you remove it.  

2.  The system will not let you remove history if you have options set to track history.  Therefore, you will first need to go to Tools | Setup | Purchasing | Payables and unmark the option for "Print Historical Aged Trial Balance".  If this option is marked, the system will automatically track history and not allow you to remove history.  So be sure to unmark this option before you try to remove history and remember to mark it again when you are finished. 

We get a lot of support cases because users see this message and are trying to get rid of it, but they don't realize that the system did already remove the transactions.  If there are further issues with removing the transaction, you may need to open a support case for further assistance.

I hope this has been helpful.

Thank you,

Cheryl Waswick | Sr. Support Engineer | Microsoft Dynamcis GP Support