There is a misperception about number sequence clean up function. It does not erase the records, it is changing the status to be Free and action to be None. As illustrated in the following diagram, the number sequence is reserved once a user create a record, the system takes this number sequence with Active status and Undecided action on the status list form.
Save – is the happy scenario where the system commit the number sequence and remove it from the status list
Crash – due to crashes, or other kinds of unexpected termination, the system keeps the reserved number sequence on the status list with Active status and Freed action
Cancel – In case of the user cancel the record creation process, the system keeps the reserved number sequence on the status list with Free status and None action.
In case of the reserved number sequence with Active-Freed and need to be changed to Free – None we use the number sequence clean up functionality, and the number sequence will be used in the future. In case of the user want to permanently delete the status list records can use manual deletion (Alt + Delete). Bearing in mind that the manually deleted number sequences will not be used in the future. In other words there will be gabs in the number sequences.
The number sequence mechanism in D365FO|AX works in that way since early versions of the system.
User A creates a new General journal record, the number sequence taken is 70.
Check number sequence status list, Active status and Undecided action
To make a session termination for demo purposes, closed the browser.
Then move back to status for number sequence, the record is Active status and Freed action
Execute manual clean up for All records.
Go back to status list the record status changed to Free and action changed to None.
This implies if an end user creates a new General journal, it will take the Free record in the status list (70).
Learn more about Microsoft Dynamics 365 for Finance and Operations – Financial management. Order your copy of Microsoft Dynamics 365 Enterprise Edition – Financial Management