You need to sign in to do that
Don't have an account?

Object Identifier
As I understand it, every object id always begins with a three character identifier that indicates the type of object. For example, accounts always begin with 001 and contacts begin with 003. My custom objects have also been assigned an identifier.
Will this three character identifier always be the same regardless of the instance of Salesforce in which it is installed? In particular, I'm curious if the identifier would be maintained if I packaged my application and then it was downloaded and installed into another Salesforce instance.
I'm guessing the answer to this question is no, but I'd appreciate getting confirmation on this if anyone knows a definitive answer.
Thanks.
I thought that might be the case.
Is there a way to retrieve the prefix in javascript? I'm interested in it to develop context sensitive help.
Thanks.
The short answer is No, as you suspected. When you create anew custom object in an org/instance, it creates the key prefix at that time. So if you package up the code with the Id defined and install it in a new org, no guarantees the prefix will be the same. If you create a Sandbox from a Production org, the Ids stay the same. Its a best practice to nothard code those ids.
You can use dynamic apex to help determine the object type by Id. Here is a snippet:
http://community.salesforce.com/sforce/board/message?board.id=apex&message.id=12963#M12963