Metadata search

Hardcoded values, Find username, Tracking dependencies, Finding references, Metadata dependencies

Ksawery Lisinski avatar
Written by Ksawery Lisinski
Updated over a week ago

The ‘Metadata Search’ is a feature giving admins superpower to locate, investigate and understand hard coded references in metadata. It navigates the intricacies of org metadata structure and allows transition from manual examination to automated scan where results are easily turned into action oriented work items to be picked up by developers.

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.

  • Apex Classes

  • Apex Triggers

  • Flows

More metadata types (formula fields, validation rules, aura components, lightning components, email templates and others) are coming throughout Q1 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:

  1. Where the IDs was found

  2. What is the type of metadata where the ID was found

  3. What ID was found

  4. What type of metadata this ID reflects

  5. What is the metadata API name this ID reflects, if present in the org

  6. 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;

  1. Where the string was found

  2. What is the type of metadata where the string was found

  3. What is the sting found

  4. 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.

Did this answer your question?