+ Start a Discussion
Benedetto Virzi 7Benedetto Virzi 7 

Test and automatic numerators


I create a cotum object with with automatic numerators (for example invoice number). When I run test this numerators increased. Is possible to avoid it?. Another question: is possible reset this numerators? What is the best solution to manage the annual invoce number in my custom object?

Thank you for your help!

There is a setting in the Apex Test Exceution Options to turn this off. See the screenshot below for how to find the setting.

User-added image
Benedetto Virzi 7Benedetto Virzi 7
Thanks a lot. Have you suggestion for me to manage annual invoce number?
If you are wanting the invoice number to be globally aut-incremented continue using aut-numbers, otherwise you could set it to be 1 greater than the number of existing invoices for that account. I am afraid it is very much use case dependent. Auto-number field are  a great way to go and used by most invoicing system on the platform.