Cloudy standing next to text that says, "How Salesforce Uses Junction Objects to Enrich Reporting."

How Salesforce Uses Junction Objects to Enrich Reporting


Did you know the Admin Relations team uses Salesforce to manage our content publication process? We publish many different kinds of content including blogs, videos, marketing campaigns, YouTube Live episodes, Twitter Spaces, and the occasional trail. We also publish on a lot of different topics like Tableau, Sales Cloud, essential habits for Salesforce Admins, Release Readiness, Slack tips, and interviews with product managers, just to name a few!

A Content record page from the Admin Relations Salesforce org.

If something may be interesting to an admin like you, we want to make sure we create content to support it. And our list of topics expands with every release, acquisition, and admin area of interest. That’s a lot of content across a lot of channels and a whole host of topics!

It’s also really important for our team to regularly review and analyze the content we publish. Reporting on our content gives us a clear picture of where we have good coverage and where we may need to create some new or similar content in a new channel.

We manage this process inside our very own Admin Relations Salesforce instance.

Junction objects for the win

First, a disclaimer: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Now, let’s discuss what a junction object is. According to Salesforce Help & Training:

“A junction object is a custom object with two master-detail relationships. Using a custom junction object, you can model a many-to-many relationship between two objects.”

Our team created a custom Topic object that relates to our custom Content object. And in between them, we created a custom junction object called Content Topic. Now, a single Topic record can be related to multiple Content records, and a Content record can be related to multiple Topic records. This is what it looks like in one of my favorite—and most underutilized—Salesforce tools, Schema Builder:

The Schema Builder canvas displaying the relationships between Content, Content Topic, and Topic objects.

Yeah, but why not a picklist?

Great question! And there’s a pretty simple answer. For this use case, picklists become a bottleneck. Remember, our list of topics is constantly growing and our team follows configuration best practices. It would take a lot of time for our SysAdmin to add new topics to a picklist, test, and deploy the changes.

What’s the benefit?

Creating and configuring a junction object is low effort and doesn’t take much time. When it’s all said and done, users (like me) can create new topic records as they need them. We can even do it right from the Content record page. Goodbye, bottleneck!

Adding a new Topic from the Content record page.

This also shows us our related topics at a glance whenever we view a content record.

The Content record page with two topics: Admin Story and Salesforce on Salesforce.

Lastly, and perhaps more importantly, it gives us a powerful way to report. We can review our content by topic or vice versa, which is very useful. And we do this in our content dashboard for the year.

A dashboard component showing content breakdown by the contributor type.

Cool, right? Now go get started!

If you’ve never tried using a junction object for reporting, now’s the time! The applications are endless. In fact, if you’re looking for a practical use case, why not try the example from this Help article? Create a custom Bug object and a custom Bug Case junction object. The end result is that your users can submit a case if they have a Salesforce issue, and you can relate many cases to a single bug or many bugs to a single case.


Sandboxes vs. Scratch Orgs and How to Use Them

Sandboxes vs. Scratch Orgs and How to Use Them

A best practice for building and configuring new solutions is to always build and test outside of your production org. But what org type should you use for building and testing? There are many resources that break down sandboxes and scratch orgs separately—but on the Admin Relations team, we often hear from admins who want […]

Save Time with the Your Account App

How Salesforce Admins Can Save Time with the Your Account App

As Salesforce Admins, you’re expected to be the expert in all things Salesforce—and that often includes details of your company’s relationship with Salesforce. We know how important it is for you to be able to access key details of your Salesforce subscriptions and contracts, manage billing details, get copies of key documents, and even add […]

Jennifer Lee and Dee Ervin in How I Solved It

How I Solved It: Close the Gaps in Activity Tracking

Welcome to another post in the “How I Solved It” series. In this series, we do a deep dive into a specific business problem and share how one #AwesomeAdmin chose to solve it. Once you learn how they solved their specific problem, you’ll be inspired to try their solution yourself! Watch how Dee Ervin closed […]


Have an Idea for a Story?

We are all about the community and sharing ideas.
Do you have an interesting idea or useful tip that you want to share?