Analyzing Salesforce Field Usage

Sharing is Caring

Over time, Salesforce orgs get more and more complicated especially when a consultant, admin or developer leaves the organization with their knowledge of the system.

It’s even possible that the organization won’t be able to remember why fields are required, or why a certain object exists or if a feature is actually in use.In my blog article Decluttering Your Salesforce Org, I discuss a lot of other reasons why an org might become cluttered.

Analizing Field Usage Manually

In most editions of Salesforce, there’s a button that can be clicked that’s labelled “Where is this used?” when looking at a custom field. For the most part, this is a fine way to look at a single field because it can look at the following places:

  • Validation Rule (only Active!)
  • Layout
  • Formula field
  • Visualforce page
  • Apex class
  • Apex trigger
  • Email templates (Only Salesforce Classic & text-based!)
  • Field set
  • Flow (query)
  • Lightning component markup (attr)
  • Process Builder (criteria)
  • URL button (formula)
  • Lightning page (related list single)
  • Lookup filter (lookup and master detail)
  • Report (column, filter)

As you can see, there are some missing things. For example, it’s not all email templates, it’s potentially missing API integrations, and there are other fringe cases not covered (joined reports aren’t covered, only reports accessible to the user are searched, etc).

Doing this on mass for every custom field would take quite a while in any older orgs. When I worked at eWAY, we had dozens of fields on a lot of the standard objects and had our own custom objects that also had dozens of fields.

The other issue with this approach is we don’t actually know how often the field is getting filled. It’s a fair guess to say if it’s required it’s 100% of the time, but that means a chunk of the data is likely wrong because people didn’t always have the info they needed at the time so they chose something.

If a field isn’t required, it’s unlikely to get data in it unless staff know exactly what the purpose of the field is. We really need to know what percentage of the time is a field filled out.

Using AppExchange Products To Determine Field or Object Usefulness

There are a number of freely available AppExchange products that can be used to measure field or object usage and do it at the root level so we can look at all of the fields in an object in one easy to use report. Field App and Field Footprint are two apps in particular that are incredibly useful and powerful for doing this.

Field Trip

Field Trip can be installed from the Salesforce AppExchange and allows you (an Administrator or Developer) to measure the usage of fields and determine whether to keep the field or not.

It will take quite a while to run but will then allow you to run reports on standard or custom objects and look at the usage of particular fields. I recommend running it on a full sandbox and then running it against production.

Field Footprint

Field Footprint was created and maintained by Salesforce Labs it looks like it’s on it’s way to being discontinued as it’s now only available via links. It’s faster than Field Trip but doesn’t necessarily provide as much information.

Removing Fields

Instead of deleting the field right away, I recommend slowly removing it from page layouts and then restricting the usage through security rules and then eventually removing it.

Sharing is Caring

Brian is a software architect and technology leader living in Niagara Falls with 13+ years of development experience. He is passionate about automation, business process re-engineering, and building a better tomorrow.

Brian is a proud father of four: two boys, and two girls and has been happily married to Crystal for more than ten years. From time to time, Brian may post about his faith, his family, and definitely about technology.