You need to sign in to do that
Don't have an account?
Scott0987
3 digit object id
I know that objects in salesforce have a 3 digit id, for instance accounts id is 001 so if you type /001 after salesforce.com/ in the url it will pull up a list of the accounts. I can think of a number of times where having this id could be handy. Is there a list someone of the default id's? Also I know that custom objects have an id like this, but the only way I have found to get that ID is to create a tab for the object, open the tab and get the id from the URL. I was hoping there is a better way to get those ID's. Thanks.
Here's the list of the standard objects:
http://www.us-techpro.com/2012/06/key-prefixes-of-standard-objects-in.html
To get the id's of custom objects, you need to use the getKeyPrefix() method the sObject Describe Result object:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_sobject_describe.htm
All Answers
Here's the list of the standard objects:
http://www.us-techpro.com/2012/06/key-prefixes-of-standard-objects-in.html
To get the id's of custom objects, you need to use the getKeyPrefix() method the sObject Describe Result object:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_sobject_describe.htm
Thanks for the list of object id's. I did find out how to get the ones for custom objects. It is the first 3 characters of the id if you open one of the objects.
Pay attention to the fact that
- this prefix is case sensitive (ex : profile id=00eU0000000XT0JIAW, roleid=00EU0000000W7swMAC)
- this prefix is not the full prefix of a record id, as you it can be followed by a U (or not)