Activity Forums Salesforce® Discussions In salesforce every record has Id so how unique IDs work?

  • Mohit

    Member
    August 31, 2016 at 7:25 am

    Hi Pranav,

    For all entity types, every record has an ID field that uniquely identifies that record. The value for the ID field is created automatically upon insert, and it cannot change over the lifetime of that record, even if the record is deleted and then undeleted. Each ID value is guaranteed to be globally unique. The ID of a record is the best way to uniquely identify that record.

    here are two versions of every record Id in salesforce :

    1)15 digit case-sensitive version which is referenced in the UI.

    2)18 digit case-insensitive version which is referenced through the API. The 18-digit reference IDs are just case-safe.

    The last 3 digits of the 18 digit ID are a checksum of the capitalizations of the first 15 characters, this ID length was created as a workaround to legacy systems which were not compatible with case-sensitive IDs.
    The API will accept the 15 digit ID as input but will always return the 18 digit ID.

    You can either pass the 15 digit or 18 digit ID for same SOQL. And for 18 Digit character version, first you have to convert the 18 character ID to  15 character version .To do this you have to follow this procedure :-truncate the last three characters.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos