Deleting a document isn't always the best solution. Ask yourself why you are deleting the document. Is it because there is a duplicate? Customer change their mind on an order? Cancel the order in the latter case. Remember, all actions are logged in the audit log. If you determine that you do need to delete a document, you must start with the very last related document and work backwards from that.
For example, if you wanted to delete a Sales Order but had created a Sales Invoice and a Cash Receipt, you would start with the Cash Receipt, then do the Invoice and lastly the Order. Here is the process step by step:
Deleting a Document
1) Determine the last transaction in the transactions that are linked to the one to delete.
2) Navigate to the List View for that document.
3) Highlight the one that you'd like to delete.
4) Choose Clear Posting in the More Actions Menu.
5) Ensure that the correct document is still highlighted and choose Delete from the More Actions Menu.
If you receive and error, it will let you know why the delete failed. Most of the time it's because there is another linked document further down the line.
Clearing the posting of a Cash Receipt.
The Delete button on More Action Menu.