Find Hardcoded Values is a full-text search across all of a connected org's indexed metadata. Type any string and dx0 searches every Apex class, Flow, validation rule, email template, and other indexed metadata type for an exact match — returning every file where that string appears, the line number, and the surrounding code in context.
The use cases are open-ended: anything you'd normally need to download the org's metadata to grep for, you can find here in seconds.
What gets searched
Searches run against the org's index, which covers:
Apex classes and triggers
Flows
Lightning Web Components and Aura components
Visualforce pages and components
Validation rules
Page layouts
Workflow field updates
Reports
Sharing rules and assignment rules
Custom fields
Lightning pages (FlexiPage)
Email templates
Custom labels
We're continuously expanding the scope of what gets indexed. If there's a metadata type that matters for your work and isn't listed here, let us know — we prioritize additions based on what consultants are actually looking for.
Index freshness
Search results are based on a snapshot taken when the org was last indexed. The timestamp is shown at the top of every result set. If the org has changed significantly since the last index, use the Refresh Org Index button on the Connected Orgs page before searching. This is particularly relevant before migrations or deployments, when you need to be certain you've found everything.
Reading results
Results are grouped by metadata type — Apex Classes, Flows, Email Templates, and so on — with a match count per group and per file. Expand a group to see the individual files. Expand a file to see each match with five lines of context before and after, with the matched string highlighted.
Each file has an Explain Usage button. This sends the file content to an AI model, which explains in plain language how the searched value is used in that specific file — what the code is doing with it, what it means in context, and anything worth flagging. Useful when you find a match in a file you don't recognise and need to quickly understand whether it's relevant.
Practical scenarios
Finding a hardcoded user ID before a sandbox refresh. A sandbox refresh will invalidate all Salesforce record IDs. Search 005 (the key prefix for User records) or the specific ID to find every Apex class, Flow, and workflow rule that has it baked in. Every match is something that will silently break after the refresh.
Tracing where an automated email comes from. A client is receiving emails from Salesforce but no one knows what's sending them. Search for the recipient's email address or a distinctive phrase from the email body to find the email template or Apex class responsible.
Finding where an error message originates. A user reports a validation error but no one can locate the rule behind it. Search for the exact error message text — even a partial phrase — to find the validation rule or Apex throw statement that produces it.
Auditing URL references before a domain change. A client is moving from a legacy domain to a new one. Search for the old domain string to find every hardcoded reference in Apex callouts, custom labels, and workflow rules that will need updating.
Checking whether a picklist API value is referenced in code. Before renaming or retiring a picklist value, search for its API value (e.g. Closed_Won) to find every Flow condition, Apex if statement, and email template that checks for it explicitly.
Locating a hardcoded record type ID. Record type IDs differ between environments. Search for the 18-character ID to find every place it's hardcoded, so you can replace it with a dynamic lookup before the next deployment.

