Record IDs

Every record within Salesforce is assigned a record ID when created.  This ID is unique throughout your Salesforce org, and is referenced frequently when performing operations using existing Salesforce data.

15 Digit Record ID

To find the record ID within the user interface, simply navigate to the record.  The ID will be shown as part of your URL, and is 15 digits in length:

1-29-2013 10-26-03 AM

You may see variants of this in configuration, such as viewing record types.  Simply click on the record type of a particular object, and you can easily locate the id of that record type:

1-29-2013 10-31-55 AM

18 Digit Record ID

The API (e.g. Data Loader) will accept 15 or 18 character IDs, but will return 18 character IDs by default.  The 18 character ID is a combination of the 15 character ID with 3 characters added to ensure that it is unique on a case insensitive basis (this is to support legacy applications).  Truncating the last 3 characters from the 18 character ID will result in the 15 character ID.  The CASESAFEID function case can be used to derive the 18 digit ID within a formula field.

 15 Digit ID18 Digit ID
Unique (Case Insensitive Basis)NoYes
UsageUser InterfaceAPI

17 Responses to “Record IDs”

  1. PNI4Admin November 11, 2017 at 3:23 pm #

    Sorry if I’m wrong, but for data mangement the 18 digit CASESAFEID() is highly important. When exporting data via reports, only the 15 digit Id is exported. That’s why i had trouble deduplicating in Excel several times (unless you use an external Id, what we do in most cases).
    John, what scenario would show the usage of the 18 digit return of the Salesforce Id via API (so without creating a formula without the CASESAFEID() function)? Think i never have seen it.


    • JohnCoppedge November 13, 2017 at 8:11 pm #

      If you pull data from the API you will get an 18 digit ID – the 15 digit ID is only presented in the user interface URL and through reports 🙂

  2. mkandil7 April 4, 2017 at 8:38 pm #

    Hello All,

    Just wanted to share an incident that happened to me before while working on SF:

    We had a filter to track down certain account’s HQ by its ID, where ID = XXX, however, all of a sudden the report returned higher values that normal.

    Turns out there’s another account with exactly the same characters but capital and small is the only difference between them.

    Don’t remember whether the filter was equal or contains, but would be helpful to know that for practical cases but not for the exam. Thanks.

  3. kgforce192004 August 24, 2016 at 3:04 pm #

    Hi John,

    This is a great study tool. I think the last sentence (CASESAFEID function case be used to derive the 18 digit ID within a formula field) should read ‘can be used’.



  4. isullisp November 10, 2015 at 8:14 am #

    I can’t find where I saw it originally, but here is another reference:
    I think SF refers to the Salesforce ID in general terms, as each object has its own “Record ID”. See here for a better explanation:

    • JohnCoppedge January 10, 2016 at 6:48 pm #

      I believe that’s true on the backend, although I don’t think you would see it much from an admin/dev perspective

  5. isullisp November 4, 2015 at 8:43 am #

    Hi John Help refers to “Salesforce Id”. Is this the same as “Record Id”? It seems like it.

  6. Gary Weidner July 14, 2014 at 12:55 pm #

    Hey John,
    First up, thanks for the awesome guide.
    Second, I believe in the graph you have comparing 15 and 18 digit record Id’s you have the case sensitive mixed up; shouldn’t 18 be case sensitive instead of 15?

  7. Shwetha Ram February 27, 2014 at 2:38 am #

    Hi John
    In this module all the screenshots are blank. Kindly let me know why they are blank.

    • JohnCoppedge February 27, 2014 at 11:14 pm #

      Hi Swetha- the screenshots are working for me. Can you reset your cache and try again? There may have been a problem with the CDN that caused this temporarily.

  8. Callum Sullivan February 6, 2014 at 4:40 pm #

    Hi John,

    I think (e.g. updating dating) is meant to be (e.g. updating data)!

Leave a Reply