Find and remove inactive metadata from your Salesforce Org
Inactive metadata accumulates over time when automations that are no longer needed or that were deactivated due to errors get forgotten. Think of your Salesforce Org as a full wardrobe you need to clean out. Inactive automation, rules, and workflows can accumulate like old clothes you no longer wear. Removing redundant metadata items streamlines your Org and boosts efficiency.
In this blog post, we’ll discuss the importance of cleaning your Salesforce org, how it can improve your processes, and how you can leverage Elements.cloud to clean inactive fields and other unused assets. By following this guide, you will lower operational costs, and enhance user experience. This guide is for Salesforce admins who want to keep their org agile and reduce tech debt.
Why remove inactive metadata?
It is a popular practice to deactivate or hide, rather than remove, unneeded metadata components in Salesforce Orgs. It is faster. While deactivating may seem quicker, is it the most effective option?
Even though some automation or inactive rules might be temporarily deactivated because they aren’t ready for deployment or were temporarily deactivated due to errors, many deactivated components are forgotten.
These forgotten metadata assets eventually lead to:
- Slower impact assessments: Dependencies on inactive metadata add unnecessary complexity to change management.
- UI clutter: The admin interface becomes more challenging due to irrelevant and outdated components in Salesforce Setup.
- Missed opportunities: If analyzed properly, components that may have been deactivated for a valid reason can still be repurposed or improved.
By finding and either re-enabling or removing outdated metadata, you streamline your Org, reduce confusion, and improve the overall health of your platform.
Why removing inactive metadata helps your business goals
Removing inactive metadata isn’t just about staying organized; it improves your business goals by cutting costs and improving efficiency. Here’s how it benefits your business:
- Improve your technical debt: With less clutter, you can streamline your change management process quicker, reduce technical debt and enable faster project turnarounds.
- Improve user experience: A streamlined setup interface ensures that admins aren’t distracted by irrelevant or inactive components, allowing them to make the changes faster.
When to find and remove inactive metadata?
Unused metadata can build up quickly, causing clutter in your organization and slowing down business processes. But how do you know when it’s time to remove inactive metadata?
You should find and remove inactive metadata when:
- Technical debt is accumulating: You notice a high volume of inactive metadata, causing clutter and slower performance.
- Preparing for major updates or Org optimization: When planning large projects or cleanups, removing inactive components helps reduce complexity.
- Deactivations caused by errors: Investigating components that were disabled due to errors may reveal easy fixes or insights for future use.
Avoid removing inactive metadata if it is only temporarily deactivated for testing or troubleshooting purposes. Before deleting, getting input from your stakeholders on the usage and relevance of metadata is helpful.
Prerequisites
To follow this guide, you need the following:
- Salesforce Metadata Management license
- Synced Salesforce org into Metadata Dictionary
Perform inactive metadata removal
To clean up inactive metadata efficiently, you can leverage Elements.cloud’s Analytics 360, Custom Views, and MetaFields features. Let’s discuss how to use them in sequence:
Step 1: Use Analytics 360 to identify inactive metadata
The first step in removing inactive metadata is to find it. Elements can simplify this process and save time.
In Elements.cloud, open the Technical Debt Dashboard using the Analytics 360 feature. Using the ‘Inactive Metadata’ chart, identify the total volume of inactive metadata components across your Org by different metadata types.
The dashboard gives a high-level overview of how much inactive automation is present, allowing you to assess the scale of the cleanup needed.
Step 2: Create a custom view to locate inactive components
You can use Elements to create a custom view to make the inactive metadata more transparent and more accessible to identify.
In the Metadata Dictionary, create a custom view to focus on the specific metadata types that can be active or inactive:
- apex trigger,
- approval process,
- assignment rule,
- business processes,
- duplicate rule,
- escalation rule,
- flow,
- matching rule,
- process builder workflow,
- report type,
- record type,
- workflow rule,
- validation rule
Include the following attributes to be displayed as columns:
- API name
- Metadata type
- Active
- Last modified date
- Last modified by
- Description
Set a filter where the “Active” field equals “Inactive”. This will list all metadata of the specified types that are currently deactivated.
Tip: You can further refine this view by sorting inactive components by metadata type or last modified date to focus on inactive metadata in specific cohorts.
Step 3: Define MetaFields to classify inactive metadata for action
Now that you’ve got a clear idea of what Metadata is inactive, the next step is to classify the metadata into MetaFields so you can see its context. This helps you understand whether you can delete the metadata or if it is still essential. For example, MetaFields such as owner, usage frequency, and retention policy can give you essential information needed to decide whether you can remove the inactive metadata or if it’s still relevant.
Before proceeding to delete your metadata, define your MetaFields.
MetaFields allows you to define custom fields you can add to different metadata types in your metadata dictionary for further analysis.
Proposed MetaField definitions
- MetaFields applied to metadata types:
- apex trigger,
- approval process,
- assignment rule,
- business processes,
- duplicate rule,
- escalation rule,
- flow,
- matching rule,
- process builder workflow,
- report type,
- record type,
- workflow rule,
- validation rule
- Action needed on inactive metadata
- Field type: Picklist Values
- Delete
- Re-Enable
- Undecided
- Purpose: Classifies the future state of inactive components.
- Field type: Picklist Values
- Deactivation Reason
- Field type: Text field
- Purpose: Captures the justification for deactivation. Enter reasons such as “Error-prone,” “Outdated,” or “Not needed.”
- Review Date
- Field type: Date Field
- Purpose: Specifies when the component should be revisited.
Step 4: Review inactive components
Using the Custom View, review information about the inactive components:
- Use the ‘Last modified date’ to determine when the component was deactivated or last touched. Components inactive for over a year are likely forgotten assets candidates for deletion.
- Review ‘Description’ (which stores Salesforce description) to determine the business purpose behind creating the component.
Inactive components that have no description and have been last modified long ago could potentially be safely deleted from the Org as forgotten assets. However, you might want to do a deeper analysis, like:
- Review change logs to understand the evolution of the definition of metadata over time.
- Consult with whoever is listed as ‘Last modified by’ on why the component was deactivated.
Once you have identified why the component was deactivated, you can update MetaFields to document that information and the action you plan to take.
You can either change that one-by-one in the right panel for a selected component or perform bulk operations:
Step 5: Document action
From the Custom View, bulk-select the inactive metadata components, and you have decided to either delete completely or re-enable (apply a filter only to display one or the other!).
Then, bulk-create user stories from the selected components to capture the work required.
Assign captured stories to the appropriate team members and link them to Jira using Elements.cloud’s integration capabilities. You can then pick up those stories from your backlog for development and deliver them when there is capacity.
Conclusion
To summarise, cleaning up your metadata can feel like a complicated process, but with Elements, we can make the process quicker and more efficient. Reviewing your metadata at least once a year and ensuring removed metadata is backed up is essential. Keeping your organization healthy saves you time for future development and can make your processes more efficient. By following the steps above, you will streamline your Org and improve user experience. If you need more help streamlining your org, get in touch with us now.
Sign up for
our newsletter
Subscribe to our newsletter to stay up-to-date with cutting-edge industry insights and timely product updates.
Xavery Lisinski
VP Product7 minute read
Published: 29th November 2024