Activity Forums Salesforce® Discussions Can you please explain the 15 digit Id and 18 digit Id scenario in Salesforce?

  • Can you please explain the 15 digit Id and 18 digit Id scenario in Salesforce?

    Posted by Prachi on November 7, 2019 at 5:43 am

    15 digit and 18 digit Ids with different cases (case Sensitivity)
    Can I have the scenario where I can have two records with the same Salesforce Ids with different cases.
    e.g.
    a124T000000kDCa   -- Ajay
    a124t000000KDca   -- Hari

    The above is an example of 15 digit Id. Is this scenario possible ?
    Is the same scenario possible with 18 digit Ids as well?

    Deepak replied 5 years ago 4 Members · 3 Replies
  • 3 Replies
  • Nikita

    Member
    November 7, 2019 at 7:46 am

    Hi Prachi,

    ID-15 are Case Sensitive
    ID-18 are Case Safe

    you can't have 2 separate records with the same ID-18

  • Yogesh

    Member
    November 8, 2019 at 12:58 pm

    Hello,

    The API can return either a case-sensitive or a case-insensitive ID field value.

    The case-insensitive ID is identical to the 15-character case-sensitive ID, but with 3 extra characters appended to indicate the casing of each of the original 15 characters.

    When inserting or updating records, the API accepts either the 15-character case-sensitive ID or the 18-character case-insensitive ID.

    When querying or searching records using the API, you must specify a value of "1" for the "useCaseSafeIDs" parameter to indicate that you want the API to return case-insensitive IDs. If you don't specify the "useCaseSafeIDs" parameter, you automatically receive case-sensitive IDs.

  • Deepak

    Member
    November 11, 2019 at 11:54 am

    Inserting or updating records, the API accepts either the 15-character case-sensitive ID or the 18-character case-insensitive ID. When querying or searching records using the API, you must specify a value of “1” for the “useCaseSafeIDs” parameter to indicate that you want the API to return case-insensitive IDs. If you don’t specify the “useCaseSafeIDs” parameter, you automatically receive case-sensitive IDs. The API can return either a case-sensitive or a case-insensitive ID field value. The case-insensitive ID is identical to the 15-character case-sensitive ID, but with 3 extra characters appended to indicate the casing of each of the original 15 characters.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos