The ‘Metadata search’ gives admins the superpower to locate, investigate and understand any hard-coded references across metadata.
It navigates the intricacies of Org metadata structure. It allows the transition from manual examination to fully automated scan, where results are easily turned into action-oriented work items to be picked up by developers, or to classify and document according to the necessary guidelines.
Prerequisites
Space on Enterprise or Consulting plan with a Salesforce org connected
Editor permissions for the Org model to start the search
Viewer permissions for the Org model to view shared results
Metadata types available for search
Right now you can perform the search for hard coded references in metadata types listed below.
Aura Component Bundles
Apex Classes
Apex Triggers
Flows
Lightning Web Components
More metadata types (formula fields, validation rules, email templates and others) are coming throughout Q3 2024.
How to access Metadata search
To access the feature, please navigate to the Org model you would like to search for hard coded references, and access that org model. There to start the search you need to access the context menu by right click on Windows and double tap on Mac, this need to be actioned from the level of an Org or metadata grouping node (see below).
Finding hard coded metadata IDs
After selecting the ‘Find hardcoded reference in code’ option please select the type of search you would like to run.
After selecting the ‘Find all hardcoded Ids’ operating mode, please hit ‘Search’. This will start the search for all hardcoded Ids (of any type) in selected metadata scope. A new tab will open in your browser, where the search will be performed, you can close this tab or wait while the processing finishes.
Finding manually defined string
After selecting the ‘Find hardcoded reference in code’ option please select the type of search you would like to run.
After selecting the ‘Find specific string’ operating mode, please hit ‘Search’. This will start the search for user defined string in selected metadata scope. A new tab will open in your browser, where the search will be performed, you can close this tab or wait while the processing finishes.
Analyzing results
The results of the search displays different information based on the operating mode you selected to show the most relevant type of information.
For the ‘Find all hardcoded Ids’ mode you will be presented with a table where columns are:
Where the IDs was found
What is the type of metadata where the ID was found
What ID was found
What type of metadata this ID reflects
What is the metadata API name this ID reflects, if present in the org
Number of times this ID is referenced in this metadata definition
Similarly, For the ‘Find hardcoded reference in code’ mode you will be presented with a table where columns are;
Where the string was found
What is the type of metadata where the string was found
What is the sting found
Number of times this ID is referenced in this metadata definition
TIP You can share the results of your search by clicking on the ‘Share’ button in the top right corner, right under your profile icon.
Working with results
The results of your search allow you to take action on the selected references found.
Please select the lines with references you are interested in taking action on. The actions you can perform are:
mass tag (replace or add),
create a single story for all selected references
create an individual story for each of selected references
open a dependency grid for further investigation
To perform any of those actions, please access the context menu the same way you have access the ‘Metadata search’ feature at the very beginning.
Should you select creating a story for each individual reference found from the results view, please note that the description of each story will be updated with the search results - It is best to simply fill the Summary, Assignee and hit ‘Attach’.
You will then be able to find the stories in your ‘Changes’ grid and update the necessary details if that’s required.