function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NBlasgenNBlasgen 

keyPrefix variations

Salesforce states:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describesobjects_describesobjectresult.htm

 

"Three-character prefix code in the object ID. Object IDs are prefixed with three-character codes that specify the type of the object. For example, Account objects have a prefix of 001 and Opportunity objects have a prefix of 006. Note that a key prefix can sometimes be shared by multiple objects so it does not always uniquely identify an object."

 

Can someone tell me what is meant by that last sentence?  Are you just saying that multiple organizations could have different objects that share the same prefix or are you saying that within the same organization that multiple object types can have the same prefix?

Best Answer chosen by Admin (Salesforce Developers) 
*werewolf**werewolf*

There are a couple of objects within an org which share the same key prefix.  One (sort of simplicatic) example would be Person Accounts and Accounts, which are technically sort of different objects, but there are other examples as well.  They are fairly rare though.  By and large, you can rely on the key prefix to identify an object within an org.

 

Outside the org it's a different story.  Your a01 and my a01 could refer to two completely different custom objects.

All Answers

*werewolf**werewolf*

There are a couple of objects within an org which share the same key prefix.  One (sort of simplicatic) example would be Person Accounts and Accounts, which are technically sort of different objects, but there are other examples as well.  They are fairly rare though.  By and large, you can rely on the key prefix to identify an object within an org.

 

Outside the org it's a different story.  Your a01 and my a01 could refer to two completely different custom objects.

This was selected as the best answer
*werewolf**werewolf*

Simplistic, not simplicatic.  I have no idea how that came out as "simplicatic."

NBlasgenNBlasgen

Thanks Marco (at least I think).