'Currency record not found' when running period rollover on Creditors

You are attempting to run period rollover for creditors but get the following message:

Period rollover finishes but did not work.

The problem occurs because there is a creditor that has Foreign Currency ticked, but no currency assigned.

To detect the problem records run the following script:

select AccountNo, Name from CR_Main where CurrencyID is null and UsesFX = 1