How to Apply Auto Number for Existing Records in Salesforce

In this Salesforce tutorial, we will learn how to apply auto number for existing records in Salesforce.

Recently I was working in the company and in that company, I am the sales manager that can Seel different products to various customers. The company uses the Customer Relation Management system as a Salesforce that helps in keeping track of interaction between the customers and product information.

Additionally, our sales team can enter the order manually into Salesforce. Each and every order has a unique order id. Although we noticed that there is an irregularity in the order numbering because of human error. The employees can enter the number manually. This can cause difficulties and confusion when the person who orders that product or also difficult for us to track and manage the order.

After discussing this issue, we want to remove this issue for this we decided to apply an auto-numbering system for existing records in Salesforce. We work with the Salesforce administrator to arrange a custom auto number field for the order object that can order by the customer.

This field can automatically generate a unique auto number for each and every new order when they were created. This auto number field existing records are present under the Fields and Relationships section. We can choose the records and apply the auto number on that record in Salesforce.

Let’s learn how to apply the auto number for an existing record in Salesforce Lightning and Salesforce Classic.

How to apply auto number for existing records in Salesforce Lightning

Here we will learn how to apply the auto number for existing records in Salesforce Lightning. Let’s take an example we are using the Product object. There are lots of Products present in the shop and the customers can order any of the products.

The shopkeeper can enter the order manually into Salesforce. Each and every order has a unique order id. Although we noticed that there is an irregularity in the order numbering because the shopkeeper can enter the number manually. This can cause difficulties and confusion when the buyer order that product or also difficult for the shopkeeper to track and manage the order.

After seeing the issue, we notice that due to this issue, lots of products are returned to the shop. To remove this issue the shopkeeper decided to apply an auto numbering system for existing records in Salesforce.

The shopkeeper connects with the Salesforce administrator to arrange a custom auto number field for the product object that can order by the customer. This auto number field can automatically make a unique auto number for every new order when they were created. The auto number field is present under the Fields and Relationships section.

If you want to learn how to apply auto number for existing records in salesforce lightning, follow these steps:

Step-1: First, log in to the Salesforce account, When the Salesforce account is login, we directly come into the Salesforce Lightning org. Go to the gear icon (⚙️) this gear icon is present near the profile picture.

Click on the gear icon the drop-down list is open and under this drop-down list, there are two options is present. The first one is Setup and another one is Service Setup. Click on the Setup option. After clicking on the Setup option, the setup page is open.

Under this setup page, we can see there are two tabs that are present on the nav bar. The first tab is Home, and the next tab is Object Manager. Here we are choosing the object manager tab, so click on the Object Manager tab.

How to apply auto number for existing records in Salesforce

Step-2: After clicking on the Object Manager, the Object Manager page is open. On this page lots of objects are present, and we want to select one of the objects. So we enter the order Product object in the search box, and the order product object comes at the top of the page.

See also  Long Text Area Salesforce

After comes the object at the top, select the Order Product object and the type of the object is Standard object.

How to apply auto number for existing records in Salesforce Lightning

Step-3: After clicking on the order product object, the Order Product Page is open. Here we can see the details related to the order product. And under this order product object on the left-hand side of the page, there is a separate section of details, and under these details, there is a field and relationships option.

We are selecting this field and relationship option for creating the fields and creating the relationship between the fields and the object. After clicking on the field and relationship option, the field and relationship page opens. Under this field and relationship page, there are lots of fields present, but we want to create a new field.

So, for creating the new custom field. Click on the new button in the middle of the field and relationship page.

Apply auto number for existing records in Salesforce

Step-4: After selecting the new button, for creating the new custom field of Order Product. the Order Product new custom field page is open. Under this new custom field page, lots of data types are present. Here we can choose the field type.

Now specify the type of information that the custom field will contain. We are choosing the auto number data type a system-generated sequence number that uses a display format we define, and the number is automatically increasing for each new record.

After clicking on the auto number data type, click on the next button that is present at the top and bottom of the order product custom field.

Salesforce apply auto number for existing records

Step-5: After clicking the auto number checkbox data type, the ordered product new custom field is open, and here we enter the details. Firstly enter the field label, and here we are entering the field label as Oredre ID after that fill the display format, and here we are filling the format as ORD-{0000}, and then fill the starting number as 1.

After Setting the Starting number now checked the checkbox generates the auto number for existing records. It automatically generated the auto number without creating the index related to the field.

After selecting the checkbox now fill the field name, this field name is automatically fielded by simply clicking on the box and the field name is Order_Id then fill the description if you want to fill otherwise leave the description field as same then there is a help text field. Here we can fill the help text if we want otherwise leave it as it is the same, and after that click on the next button.

Salesforce Lightning apply auto number for existing records

Step-6: After clicking on the generating the auto number for the existing records checkbox, now establishing the field level security. Select the profiles to which we want to grant edit access to this field via field-level security.

The field will be hidden from all the profiles if we do not add it to the field-level security. Click on the visible checkbox for selecting all the field-level security for the profile. Click on the next button that is present at the top and the bottom of the order product new custom field page.

How to apply the auto number for existing records in Salesforce

Step-7: After establishing field-level security. Now we can add the page layout. Select the page layouts that should include this field.

The field will be added as the last field in the field two-column section of these page layouts. This field will not appear on any pages if you do not select a layout.

To change the location of this field on the page, we will need to customize the page layout. Click on the save button that is present on the right side of the add to page layout.

How to apply the auto number for existing records in Salesforce Lightning

Step-8: After clicking on the save button, the pop-up message comes at the top of the page that is generating the auto numbers for existing records may take a few minutes. Click on the OK button to start auto number generation.

Apply the auto number for existing records in Salesforce

Step-9: After clicking on the ok button. The new Field Order ID related to Order Product is created successfully with the type as the auto number and shown under the field and Relationship page. There is no indexes are created because this field automatically generates the number.

Apply the auto number for existing records in Salesforce Lightning

This way, we understand how to apply the auto number for existing records in Salesforce Lightning. Let’s Proceed and learn how to apply the auto number for existing records in Salesforce Classic.

See also  Salesforce Phone Data Type

Read Effects when Auto Number Field Exceeds the Specific Digits in Salesforce

How to apply auto number for existing records in Salesforce Classic

Here we are applying the auto number for existing records in Salesforce Classic. Let’s take an example we are using the USA Employee object. There are lots of Employees present in the company.

I am the HR Manager of the company and manage the employee records for the company that previously used manual methods to assign employee ids. Although we noticed that there is an irregularity has arisen in the employee id format that makes this challenging to quickly identify and managing the employees.

For removing this issue, the HR manager discuss this issue with the head and they decided to implement an auto number for the existing employee records.

If you want to learn how to apply auto number for existing records in salesforce classic, follow these steps:

Step-1: First, logging the Salesforce classic account, but when we log in to the Salesforce account, we first enter into the Salesforce lightning account. But we want to move to the classic account.

To move to the classic account, click on the profile picture. After clicking on the profile picture, the drop-down menu is open. Under this drop-down menu, there is a switch to the Salesforce classic option is present.

Click on the Switch to Salesforce Classic option, the Salesforce Classic edition is open. Now we can apply auto numbers for existing records in Salesforce Classic.

How to apply auto number for existing records in Salesforce Classic

Step-2: After clicking on the Setup option, the Setup page is open. Now scroll to the bottom of the page, on the left side we can see that there is an object option that is present under Create after clicking on the drop-down arrow of Create the drop-down list is open. Under this list, the objects option is shown. Click on the objects option.

Apply auto number for existing records in Salesforce Classic

Step-3: After clicking on the objects option, the objects page is open. Under this page lots of objects are present, select one of the objects. Here we are selecting the USA Employee object.

Salesforce classic apply auto number for existing records

Step-4: After selecting the USA Employee object, the USA Employee page is open. Here we can see the detail related to USA Employees. Now scroll to the bottom of the page and we can see there is a custom Field and Relationship section.

We want to create a new field related to USA Employees. For creating a new field, click on the new button.

How to apply the auto number for existing records in Salesforce Classic

Step-5: After selecting the new button, for creating the new custom field of USA Employee. the Employee New custom field page is open. Under this new custom field page, lots of data types are present. Here we can choose the field type. Now specify the type of information that the custom field will contain.

We are choosing the auto number data type a system-generated sequence number that uses a display format we define, and the number is automatically increasing for each new record. After clicking on the auto number data type, click on the next button that is present at the top and bottom of the order product custom field.

Apply the auto number for existing records in Salesforce Classic

Step-6: After clicking the auto number checkbox data type, the Employee new custom field is open, and here we enter the details. Firstly enter the field label, and here we are entering the field label as Employee ID after that fill the display format, and here we are filling the format as EMP-{0000}, and then fill the starting number as 1.

See also  How to Set Default Value for Time Field in Salesforce

After Setting the Starting number now checked the checkbox generates the auto number for existing records. It automatically generated the auto number without creating the index related to the field. After selecting the checkbox now fill the field name, this field name is automatically fielded when we click on the entry box and the field name is Employee_ID.

And then fill the description if you want to fill otherwise leave the description field as same then there is a help text field here we can fill the help text if we want otherwise leave it as it same, and after that click on the next button.

Salesforce classic apply the auto number for existing records

Step-7: After filling the complete detail now, established the field-level security. Select the profiles we want to grant edit access to this field via field-level security.

The field will be hidden from all profiles if we do not add to it field-level security. Click on the visible checkbox of the field-level security for the profile and then click on the next button, which is present near the previous option.

How to apply an auto number for existing records in Salesforce Classic

Step-8: After establishing field-level security. Now we can add the page layout. Select the page layouts that should include this field.

The field will be added as the last field in the field two-column section of these page layouts. This field will not appear on any pages if you do not select a layout. To change the location of this field on the page, we will need to customize the page layout. Click on the save button.

Apply an auto number for existing records in Salesforce Classic

Step-9: After clicking on the save button, the pop-up message comes at the top of the page that is generating the auto numbers for existing records may take a few minutes. Click on the OK button to start auto number generation.

After clicking on the ok button. The new Field Order ID related to Order Product is created successfully with the type as the auto number and shown under the field and Relationship page. There is no indexes are created because this field automatically generates the number.

Salesforce Classic apply an auto number for existing records

In this way, we have learned, how to apply auto numbers for existing records in Salesforce Classic.

Conclusion

We conclude that the auto number is applied to the existing records in Salesforce by simply clicking on the checkbox of generates the auto number for existing records that is present under step-2 where we can fill in the details related to the custom field. After clicking on the checkbox it automatically generated the auto number without creating the index related to the field.

I hope you read the complete blog and you have learned how to apply the auto number for existing records in Salesforce. This auto number field helps generate a sequence number. And I have also explained all the steps of applying the auto number for existing records in Salesforce Lightning and Salesforce Classic.

You may also like: