[SalesForce] How to get a complete list of fields for a standard object

I am new to Apex, but it is apparent to me that most (if not all) standard objects probably have an ID field. However, this field does not appear in the reference for the standard objects in the Soap API Developer's Guide. Instead, it reads:

To verify the complete list of fields for an object, you can use a
describe call from the API, or inspect with an appropriate tool, for
example, inspecting the WSDL or using a schema viewer.

If I want to find out for sure whether an object has an ID field, or what the field is named (is it ID, Identifier, id, etc), it sounds like I need to use a "describe call" or "an appropriate tool" or inspect the "WSDL" using a "schema viewer".

Now, I am an experienced software developer, but those solutions are so ambiguous I have no idea where to look next to figure out how to get an object's ID. Can anybody either refer me to more specific documentation, or explain how to find the complete field documentation via a "describe call", "appropriate tool", or "schema viewer"?

Best Answer

From within an org itself, you can view it either via the Object definition or Schema Builder. For standard objects, you'll see them under "Customize->Object Name" in the setup menu (or just type the object name into the quick filter). Or in Schema Builder, you can just filter down to the objects want.

From within Apex, you can use the system level Schema object to do describes. More info here

From the API, you can use the meta data API to get information about customizations, or you can see them via the Enterprise version of the WSDL.

The Id field is a special case in that it exists on all objects. Documentation about the Id field can be found here.

Related Topic