You need to sign in to do that
Don't have an account?
Is there a way to programmatically set the starting number of an autonumber field?
I've discovered that creating an autonumber field that resets the sequential portion after the year changes is not possible. Accomplishing this, in general, seems non-trivial.
I think I have a way around it, though. What if I were to create a method on an Apex class that runs under the Apex Scheduler at the beginning of each year that programmatically resets the starting number of an autonumber field?
Can the starting number be set programmatically? I read elsewhere on the Discussion Boards where one has to change the autonumber field to a text field, and then back to an autonumber field with the new starting number. If the year is part of the autonumber's format, this should avoid the uniqueness issue.
Is all of this possible?
Thank you.