You need to sign in to do that
Don't have an account?
IvanWatling
SOQL to get auto number?
Is there some SOQL I can write to find out what the next number generated by an auto number field will be? I want to see how much an auto number field jumps when I run my unit tests. I'm not allowed to create a new record and simply look at it's auto number field.
Thanks
Hi ,
you can make a Query to the object as below
SELECT auto_Nuber_field FROM Object ORDER BY auto_Nuber_field DESC LIMIT 1
You will get the existing maximum number in the auto number.
Thanks,
Dinesh Nasipuri
Dinesh.Nasipuri@gmail.com