Search
Close this search box.

Salesforce Workbench: Part Two – Object Browser

Red Argyle Logo without name
Red Argyle logo

“What the heck is the name of that child relationship?” I swear this question is responsible for 90% of my visits to the Salesforce Workbench. When I’m in “developer mode,” negotiating object relationships in complex SOQL queries, I need quick access to relationship names, picklist options, and data types. Enter the Workbench Object Browser.

 

Salesforce Workbench Tips, part 1

 

The Object Browser (titled “Standard & Custom Objects” in the app) allows you to choose any object available in Salesforce and review all of its attributes, fields, relationships, and record types in a fast and easy-to-navigate tree structure. Sure, I could sift through the Salesforce admin panels and eventually arrive at the same information, but that process is slow and spread out.

 

Workbench Object Browser Information
Everything I wanted to know about Salesforce objects, but was afraid to ask.

 

Going back to my lead-in question in this post, here’s a classic use case for Workbench. Imagine I have a system that collects applications. We’ll call it the “Application” object. Related “Performance” objects track the measures pertinent to those the applicant has when submitting their Application.

 

Now it’s time to write a SOQL query that pulls Applications with related Performance records.

 

Code: SOQL query that pulls Applications with related Performance records

 

If you’ve written SOQL with a subquery for children like this example, you’ve no doubt run into the question of “what does the Salesforce API call that child relationship?” In the example above, “What_The_Heck_Is_The_Child_Relationship_Name_for_Professional_Performance” is the relationship name we need to identify to make our query work correctly. Usually, finding the relationship name starts out as multiple guesses at including and excluding underscores, and forgetting the “__r” at the end. Workbench helps stop the madness: just locate the child relationship you want to include in your query and locate its “relationshipName” value. Way easier, way less banging of heads on tables.

 

Object Browser results screen grab
Without the Workbench Object Browser, I’d still be guessing…

 

Object, fields, record types and relationships–if it’s in the Salesforce API, it’s in the Workbench. Forget a picklist value? It’s in there. Need the key prefix of an object? It’s in there. Can’t remember if the “Converted Date” on a Lead is a “Date” or a “DateTime”? It’s in there.

 

Workbench’s Object Browser is a perpetually open tab on my computer. Next time you need details about the schema in your Salesforce org, take the Workbench Object Browser for a spin! And for more info on Workbench, read this blog post on the “retrieve” and “update” capabilities, or this post from Lindsey on how to pull a metadata backup from Workbench.

Red Argyle logo
Red Argyle logo

Related Blog Posts