Microsoft Dynamics 365 Business Central sync error: Posting Date must have a value in Sales Header: Document Type=Credit Memo, No.=XXXXX. It cannot be zero or empty

Why the sync error occurs

This error occurs when you create a sales credit memo in Microsoft Dynamics 365 Business Central (MSDBC) but there is no posting date. A posting date is required for the credit memo to sync to Cashflow360.

How to fix the sync error

Add a posting date to the sales credit memo in MSDBC, then sync again.