+ Start a Discussion
Fabian ErikssonFabian Eriksson 

question about IDs and outbound messaging

 Hi there

I am experimenting with outbound messaging and so far it works fine. What i noticed is that the IDs (AccountID, OpportunityID...) that i receive with the outbound message do not match the IDs defined in Salesforce frontend. For example:

Opportunity

In SalesForce: 0062000000YwVSD
ID passed by Message: 0062000000YwVSDAA3


Account

In SalesForce: 0012000001BWnkc
ID passed by Message: 0012000001BWnkcAAD

It seems the last 3 characters get added with the message and i don' t know why...
Is there a system behind this or can someone explain me how this works?
With this i have difficulties matching the 2 IDs, which is essential for my problem. I have a static list of Account IDs defined in SharePoint  (the ones i find in the frontend of SalesForce) and i need to seach that list with the ID passed by the message.


I hope someone can help me there or give me a hint.


Thanks,

~ Fabian
Best Answer chosen by Fabian Eriksson
ShashForceShashForce
Hi Fabian,

This is how it works in Salesforce. There are two versions of every Record ID in salesforce.com:

1.) 15 digit case-sensitive version which is referenced in the user interface
2.) 18 digit case-insensitive version which is referenced through the API

The last 3 digits of the 18 digit ID is a checksum of the capitalisation of the first 15 characters, this ID length was created as a workaround to legacy system 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.

If you would like to expose the 18 digit IDs on your records, you can easily create a formula field and use CASESAFEID() function to get the 18 digit IDs of records.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank

All Answers

ShashForceShashForce
Hi Fabian,

This is how it works in Salesforce. There are two versions of every Record ID in salesforce.com:

1.) 15 digit case-sensitive version which is referenced in the user interface
2.) 18 digit case-insensitive version which is referenced through the API

The last 3 digits of the 18 digit ID is a checksum of the capitalisation of the first 15 characters, this ID length was created as a workaround to legacy system 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.

If you would like to expose the 18 digit IDs on your records, you can easily create a formula field and use CASESAFEID() function to get the 18 digit IDs of records.

If this answers your question, please mark this as the Best Answer for this post, so that others can benefit from this post.

Thanks,
Shashank
This was selected as the best answer
Fabian ErikssonFabian Eriksson
Thanks for the super fast reply, that answered my question :)