function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Susan ShopaughSusan Shopaugh 

Automated Numbers for custom fields

We have our quote numbers set up as custom auto generated numbers, so that it shows the year, month and then the sequence number. Q- {YYYY}{MM}{000}. How can we make it reset to zero when the month changes? We the quote numbers are getting far too long.

 

What we need is for the following or trailing three numbers to be dependent on the month, so when it changes the following 3 digits reset. Is there a formula or rule we can make so that our numbers don't get too long?

Best Answer chosen by Admin (Salesforce Developers) 
jd123jd123

Hi

 

Insted of this write a workflow rule with field update.

All Answers

jd123jd123

Hi

 

Insted of this write a workflow rule with field update.

This was selected as the best answer
SFFSFF

jd123 is correct - but if you don't want to do that, you can also just reset the auto-number definition to 1 whenever you think it has gotten too long. Since the Year and Month are already part of the number, you have a reasonable likelihood of maintaining uniqueness if you time it right.

 

Hope this helps,