1

what is the maximum salesforce id length? I have to communicate it to another system that has to create an ad hoc field

  • 2
    I would tell them to create a 18 characters case-sensitive alphanumeric field. – Alberto Sep 3 '18 at 11:27
4

Salesforce is using 18 character IDs.

There are also the shorter 15 char case-sensitive ones. Salesforce recommends the use of the longer one.

For more information see the official documentation on the topic: https://help.salesforce.com/articleView?id=000004383&language=en_US&type=1

| improve this answer | |
  • 3
    The 18 character IDs are definitely NOT case insensitive (try to use a known ID in a query, but change one of the characters to lower case). The difference between the 15 and 18 character IDs is that the 18 character version has a sort of hash to be able to reconstruct the casing of the 15 character version. So if you have an all lower case 18 character ID you can reconstruct the proper casing, but this is not done implicitly. – rael_kid Sep 3 '18 at 12:44
  • For more information see the official documentation on the topic: help.salesforce.com/… – mlew Sep 3 '18 at 13:04
  • 2
    That documentation appears to be very old. They typically refer to 18 character Ids as "case safe", meaning they're safe to be used with tools (primarily Excel) that cannot distinguish 15-character Id values based on case differences. – David Reed Sep 3 '18 at 13:12
  • There are lots of pages where a solution to this can be found anyway like here: developer.salesforce.com/forums/?id=906F0000000BQGnIAO OR here: help.salesforce.com/articleView?id=000003004&type=1 But your comments are not referencing the question anymore. Length = 18 he did not ask for any more information. Also, you are completely right that it is a duplicate. how can I flag it as one? – mlew Sep 4 '18 at 15:28
  • my question was not related to how the salesforce ID is composed, I did not know whether to communicate 15 or 18 because the external system will query from the outside so I did not know how many characters it would extract. Forgive me if considered duplicate – Pericle Parquet Sep 7 '18 at 14:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.