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
Pathan SPathan S 

Auto number regenerate which fields are deleted aggin deleted number for new records/

I created a one auto number field name(No of students).when i created a record   auto number is generating as auto.then created a 5 records then i deleted  one record Ex.0004. then again i created new rcord but is contunue auto.but i want to re allocate which record number(0004) are deleted. when i creat new record it will be take as a new record 0004.plz give reply.
RbnRbn
Hi Pathan,

In Salesforce,  AutoNumber field always increments on each new record.  If you delete a record, the 'auto-number' value is not re-used because the record could be un-deleted.

Hence, if you want to achieve your functionality you have to go around writing some custom logics .

Regrds,
Rabindranath