Auto Number Field Types

Information like tracking numbers, invoice numbers, or other consecutively ordered numbers is a part of the business. Often, your business processes require these types of numbers to be customized and formatted into more valuable formats than a bunch of random numbers and letters. Fortunately, Salesforce has an out of box solution to solve this issue. You can create automatically generated number fields on any standard or custom Object. The Data Type that Salesforce uses for this is called Auto Number.

Auto Number – Automatically generates a values for each new record incrementally that can be customized for your business process.

What are Auto Numbers

Auto Numbers are fields that automatically generate numbers incrementally. You can display numbers from 1 digit up to a max of 10 digits. You are also allowed to customize the display format better to meet the unique naming conventions of your business. We will walk through the steps to create an Auto Number field later in this guide, but first, let’s go over some of the detailed areas unique to Auto Numbers.

Display Format – A Display Format allows you to control the appearance of the Auto Number field. A Display Format consists of the variables described below. You can add characters as prefixes or suffixes to make them more customizable to your business needs.

Chart of variables in the display format field in an Auto Number
Variables in a Display Format

Starting Number – The starting number identifies what number the records will begin. The record number will increase incrementally from here by one digit each time a new record is created.

External ID – This check box sets this field as the Unique Record Identifier from an external system. 

How to Create an Auto Number Field on Your Object

The first thing you need to do is go to the Object Manager in Salesforce

  • Setup
  • Object manager
  • Select the Object you want to add an Auto Number field to
  • Field & Relationships
  • New
  • Choose Auto Number
Choose Custom Field Auto Number
Custom Field – Auto Number

Click Next

In this screen, we will fill out all of the field details. We will fill out the field label, determine the display format ( see the above chart and description for more information), Field Name, Description, and Help Text. In this example, I am creating an auto-generated Tour Number n the following format: T-22-0012. It starts with the letter T, has the two-digit year, and has four digits for the auto-incrementing number.

New Custom Field Details Page
New Custom Field – Details Page
  • Step 1 – Field Label: Tour Number
  • Step 2 – Display Format: T-{YY}{0000}
  • Step 3 – Field Name: This is the API Name, and in our example: Tour_Number
  • Step 4 – Description: Describes the purpose of the field
  • Step 5 – Help Text: Provides a message for help

After that, you need to follow the Prompts to finish out the screens



Congratulations! You now have a field that auto-generates numbers in the format that fits your business process.

Leave a Reply

Your email address will not be published. Required fields are marked *