Recently, a Dynamics 365 Business Central customer asked us if there’s a way to create a sales return order that automatically applies the credit memo to the related invoice. Whenever they processed a credit memo, the system created a comment within the credit memo referencing the sales invoice but did not actually close either the invoice or the credit memo.
After some trial and error and with some help from Microsoft support, we finally found a workable solution. The solution differs slightly depending on if you’re dealing with an unpaid sales invoice versus a paid invoice, and it cannot be used when dealing with multiple invoices — That must remain a manual process. In case you’re having a similar issue, below is our solution.
Option 1 – Automatically Apply Credit Memo to Unpaid Sales Invoice
In this scenario you follow all the steps required to create your Sales Return Order but before posting the document you must change the Applies-To Doc. Type field to Invoice and the Applies-to Doc. No. to the actual invoice number. You may then post the document and verify the customer ledger entries to verify both the credit memo and the invoice have a “0” remaining balance. See our example below.
Option 2 – Automatically Generate Return on Paid Invoice
Your first step will require a one-time setup of a new payment method such as the one highlighted below:
Now open your sales order return. After populating all the required fields, you will need to enter the payment method you created above (in our example “cash”) and then process the transaction.
By selecting a payment method of cash, the system will close out the credit memo and create a refund, which you can now apply to an open invoice or to generate a check.