How to create a Batch (Case) number Like 201205XXX Where xxx resets each month?

Discussion created by AllPointsMediaWorks on May 25, 2012
Latest reply on May 26, 2012 by AllPointsMediaWorks

I'm needing to accomadate a case number that creates a unique case number based on year/month of creation and increments sequentionally. Each month the sequence resets to 1. I'm presuming we have a autoenter field to create the date, but the part that's got me confused at the moment is the sequence reset requirement. I would presume I somehow need to evaluate the last batch number and compare against the current date or perhaps a global field and determine if that day is different from today's date and if so reset another global field or somethign like this.


Anybody have a best practice example for this?






Note that this needs to be able to support multiple users creating cases concurrently with no duplicates numbers.