Who changed my metadata, and when?

Alex Walter on

Share with

LinkedIn
Twitter

Have you ever wondered why some components in a comparison don’t have changed on and changed by values in Gearset? We’ve certainly been asked this question a few times over the past couple of years, but some recent changes will make it a thing of the past.

Okay, a thing of the past might be a bit overblown - because Gearset decomposes compound types into their subcomponents, there will always be items for which accurate changed on and changed by info just isn’t tracked by Salesforce - but these scenarios should be much less common.

The cause

Metadata is cumbersome. Some files - custom objects for one, but particularly profiles and even permission sets - can balloon to astronomical sizes for large and complex orgs. This poses Salesforce devs and admins two problems at deployment time:

  1. It’s hard to deploy just the changes you’ve made without resorting to xml editing
  2. If you don’t resort to xml editing, it’s likely your changes will conflict with or overwrite changes made to the same file by your teammates

To make deployments more granular and to reduce the chance of conflicts when deploying changes, Gearset decomposes larger, compound types into subcomponents, and we’re not alone - Salesforce DX has adopted a similar technique to reduce the frequency of conflicts.

However, because this is a client-side transformation - we pull the metadata from Salesforce as single items then decompose them into subcomponents - we only receive changed on and changed by details for top-level items, but not their resulting subcomponents. For orgs with lots of changes, this can make it difficult to separate the interesting items that you’d like to deploy from the background noise.

The solution

Firstly, Salesforce obviously tracks a lot of this information, because it’s available in the UI:

Changed on and changed by information in Salesforce

The good news is that for some of these components, we can make additional queries to Salesforce to retrieve these values for Gearset to use. Specifically, most subcomponents of custom objects are available, including:

  • CustomField
  • FieldSet
  • RecordType
  • ListView
  • Weblink
  • ValidationRule
  • BusinessProcess
  • SharingReason

This additional information makes it easier to find the metadata you’re interested in, or identify who to talk to about an unexpected change.

Changed on and changed by information for custom object components in Gearset

Going forwards

There are still some places where these values aren’t available, specifically some standard fields on specific objects (e.g. standard fields on Asset), and there’s still no API providing this information for components of profiles or permission sets, so there will still be occasions where we don’t know who a component was last modified by or when, but these instances will be less common. That said, this is just the first batch - we’ll be adding more of this sort of information for other types of component, and we’ll be looking for innovative ways to display this information for components unsupported by the Salesforce APIs.

If there are any components of metadata types where changed on and changed by details would be especially useful, or if you have any other feedback about Gearset, then don’t hesitate to get in touch. Just drop us an email at [email protected], or send us a quick message via the live chat - we’d love to hear from you!

Ready to get started with Gearset?