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
crmdrcrmdr 

How to find out object and field numbers?

I remember reading somewhere that each object has a number, as does each field.  I am needing to use these in an s-control that I am trying to create.  I already have been able to find a few of these by copying them from another s-control written by someone else (e.g. 006 for the opportunity object and opp6 for the lead source in this object.)  Can anyone tell me the best way to find out the numbers for all objects/fields?
crmdrcrmdr

I was able to get the answer from Salesforce.com support:

To find the Object ID, click "new" to create a new object in that record. Then, while on the "edit" page, look at the URL in the address bar. You will see something like:

https://na2.salesforce.com/001/e?retURL=%2F0013000000EMMMB...

The characters immediately following the "salesforce.com/" are the ID of the object - in this case "001" which specifies an Account.

To find a field ID, click "new" to create a new object in that record. Then, while on the "edit" page, view the page source code and search for the name of the desired field. Using the example of the Account Site field you see:

Account Site</label></td><td class="dataCol col02"><input value="" tabindex="4" maxlength="80" id="acc23" size="20"....

The field ID is listed after the "id" parameter - in the above example the field ID would be "acc23" (without the quotes).

Gareth DaviesGareth Davies

HI there,

When we wrote developer's sidekick I found that the API would give you the "object number" and this is reported in the Schema Browser Interface, but I never found a way to get the "field number" other than by looking at the HTML. If anyone knows how to get this via the API we'll recode it into the program (it's free).

Cheers

Gareth