How to Find Objects with ‘History’ in Their Name in Salesforce

Introduction

If you’re working with Salesforce, you know how crucial it is to track changes and maintain a clear audit trail. Salesforce provides various “History” objects that help you keep track of changes to records. These objects can be a bit tricky to locate, especially if you’re dealing with a complex setup. In this post, we’ll guide you through the steps to find any object in Salesforce with ‘History’ in its name.

Why History Objects Matter

Before we dive into the how-to, let’s briefly discuss why history objects are important. These objects store the historical data of standard and custom objects, capturing changes made to the fields you specify. This is invaluable for auditing, troubleshooting, and understanding data evolution over time.

Step-by-Step Guide to Finding History Objects

1. Using Salesforce Object Manager

One of the simplest ways to find history objects is through the Object Manager in Salesforce.

  1. Log in to Salesforce.
  2. Navigate to Setup by clicking the gear icon at the top right and selecting “Setup”.
  3. In the Quick Find box, type Object Manager and select it.
  4. In the Object Manager, use the search box to type History.

You’ll see a list of objects that include ‘History’ in their name, such as Account History, Opportunity Field History, etc.

2. Using Salesforce Schema Builder

Salesforce Schema Builder is another powerful tool to visually find objects and their relationships.

  1. Log in to Salesforce.
  2. Navigate to Setup.
  3. In the Quick Find box, type Schema Builder and select it.
  4. In the Schema Builder, check the box next to All Objects.
  5. Use the search function within Schema Builder to type History.

This will highlight all objects with ‘History’ in their name, making it easy to locate them within your data model.

3. Using SOQL (Salesforce Object Query Language)

For those who are comfortable with querying, SOQL is a quick way to find history objects.

  1. Open Developer Console by clicking on your avatar in the top right and selecting “Developer Console”.
  2. In the Developer Console, navigate to the Query Editor.
  3. Run the following SOQL query:
SELECT QualifiedApiName 
FROM EntityDefinition 
WHERE QualifiedApiName LIKE '%History%'

This query will return all objects that have ‘History’ in their name.

Conclusion

Finding objects with ‘History’ in their name in Salesforce can be straightforward if you know where to look. Whether you prefer the Object Manager, Schema Builder, or SOQL, Salesforce provides robust tools to help you manage and track your data effectively. Keeping a close eye on these history objects ensures you maintain a clear audit trail and can troubleshoot any issues with greater ease.

We hope this guide helps you in navigating and utilizing Salesforce history objects more efficiently. If you have any questions or need further assistance, feel free to leave a comment below!