what would be the solution for this
1 answer
Hi Amit,
There is no standard mechanism that does this - you will have to build something yourself. The trick is going to be keeping a counter that resets monthly, so that each month will begin a brand new count.
The logic would be as follows:
A new record is created, which would trigger a flow or Apex trigger
The flow/trigger would query the most recently created record of the same object
If the date portion of its creation time is different than the created date of the new record (has a different month or year), set a custom number field to 1
Otherwise, set it to the queried record's number field + 1
Use a formula field to combine the year, month, and the counter field