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
Niharika GoudNiharika Goud 

I have Created a record with auto-number field. I have 10 Records if i delete the records then i need to get from starting number in the same object

I am new in sfdc plz  help me with full details
Alisha Mehta 9Alisha Mehta 9
The only way I know of is to change the field type to Text and then change it back to Auto Number. Then it starts from starting number.
Satish PrajapatSatish Prajapat
Hi Surender,
you can not change name from customization, but it can be achieved by simple Apex  code.
please check code below:
public class Test 
    public List<Employee__c> myList = new list<Employee__c>();
    public List<Employee__c> updatedList = new list<Employee__c>();
    public Test()
    	myList = [select Name from Employee__c order by CreatedDate];
        Integer i=0;
        for(Employee__c cc : myList)
   ='Employee'+i; //whatever name you want to keep it.
        update updatedList;

Make sure that 'Name' field data type must be Text type (Should not be auto number).
Change the object api name in code on which you want to achieve your goal.

if this will help you, mark it as a best answer. 
Satish kumar prajapat.