Keep the full date (YYYYMMDD) visible in the document ID
But only reset the 5-digit counter every month, not every day
Here’s the behavior I want:
CO-20251110-00001
CO-20251110-00002
CO-20251111-00003 ← next day, counter continues
…
CO-20251201-00001 ← new month, counter resets
By default, using {YYYY}{MM}{DD} makes Frappe reset the counter daily since the day ({DD}) is part of the prefix.
How can I prevent this and make it reset monthly instead? Any solutions?
Think about replacing the {DD} with a real field. Then replace the {DD} with the field name that you fill before naming the document, and maybe gets emptied later.
This might increase the database slightly, but you might consider this solution.