+ Start a Discussion
etessetess 

What happens when auto number reaches max?

Was just wondering if anyone knows what happens when an autonumber field hits its limit (ex: if a one digit auto number gets to 9, what happens next?). Does it error out?

Best Answer chosen by Admin (Salesforce Developers) 
goabhigogoabhigo

If a one digit auto number gets to 9, next record's value will be 10.

I saw it in one of the dev401 certification videos. But I don't know what is the maximum limit !!

All Answers

goabhigogoabhigo

If a one digit auto number gets to 9, next record's value will be 10.

I saw it in one of the dev401 certification videos. But I don't know what is the maximum limit !!

This was selected as the best answer
sfdcfoxsfdcfox

The maximum number appears to be 9,999,999,999 (1 short of 10 billion). The field appears to be limited to Number(10), which is the maximum number of placeholder zeroes you can specify ( {0000000000} ). Salesforce will not allow you to start higher than 1,000,000,000. This means that the limit is outside the reach of virtually every organization in the world (you would need to be able to generate 9 billion records, which means that if you had 5,000,000 API calls per day, it would still take you 9 days to pull enough API calls to test what happens when you exceed this limit, and you'd have to flush your recycle bin every few hours to keep from rolling out records that users might actually want to keep (or the extra API calls would cost you another 9 days). And that's assuming Salesforce didn't cut you off for spiking resource usage for no apparent reason. Suffice to say, most organizations will never need to worry about running out.