Determine object type from the ID

posted Oct 14, 2014, 10:36 AM by Ezra Kenigsberg   [ updated Feb 2, 2015, 12:31 PM ]

#DataTipOfTheDay 2014-10-14

Q: "I've got an ID, but can't figure out what object it is. How can I figure it out?"

A: First try navigating to the URL that uses the first three characters of the ID. For example, if your mystery ID is 001abcdefghijkl, navigate to, and you'll find that your mystery ID is an Account.

If that doesn't help (because the object doesn't have a dedicated tab, or has a name that coincides with other objects), you can use Developer Console to figure it out. Props to the "Simply" blog!

Edit: eh, I prefer running it in Workbench:
  1. Login
  2. Click "Utilities | Apex Execute"
  3. Execute the statement
    System.debug(System.LoggingLevel.ERROR, Id.valueOf('[MysteriousID]').getSObjectType());