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
Book_GuyBook_Guy 

Records (Auto Number) Names - Out of Sequence

Hi All,

 

We have a custom shipment object whose name is an autonumber.  Over the last few months it has starting skipping numbers at an alarming pace.  Does anyone know what could be causing this?  Could a Unit Test or Trigger be causing this?

 

TIA

 

--David

Pradeep_NavatarPradeep_Navatar

Some scenarios :

 

1. You have deleted some records.

 

2. Trigger does not work properly if you have implemented custom Auto number functionality.                                 

sham_1sham_1

Running unit tests (that do DML) causes the auto number to jump.

Probably , there is some frequent production deployment going on. A deployment of code to the production instance causes all tests to fire,

you can see a jump in sequence, after manually running test all tests in the production instance