Identifying Undocumented Salesforce Components Using Tooling API and SOQL Queries
A method involving Salesforce CLI, Tooling API, and SOQL queries can be used to identify undocumented custom fields, flows, and validation rules within a Salesforce org. This approach helps uncover components with…

Custom fields without descriptions or help texts can be identified using a specific Tooling API query. This query selects custom fields where the NamespacePrefix is null, excluding managed package fields. The absence of both Description and InlineHelpText typically indicates that the meaning of the field resides solely in someone's memory. This method helps identify components that may be undocumented and need clarification. [1]
Active flows without descriptions can be found using a SOQL query on the FlowDefinitionView object. This query selects active flows where the Description field is empty. Flows that lack descriptions are considered risky because they operate autonomously without clear documentation, making them difficult to understand or manage for new administrators. [1]
Active validation rules without descriptions can be identified using a Tooling API query on the ValidationRule object. This query selects active validation rules where the NamespacePrefix is null and the Description is empty. The ErrorMessage column should also be reviewed, as vague error messages can hinder user understanding and troubleshooting. [1]
The Dev.to article discusses a method to identify undocumented Salesforce components, focusing on custom fields, flows, and validation rules that lack descriptions. These queries are executed using the Salesforce CLI against the Tooling API and SOQL, generating CSV files. The first query identifies custom fields without descriptions or help text, filtering out fields from managed packages by setting NamespacePrefix = null. This helps locate fields whose purpose is not documented, relying instead on the memory of senior administrators. The second query targets active flows without descriptions, using FlowDefinitionView with SOQL to find flows that operate without clear documentation, posing a risk due to their autonomous execution. The third query identifies active validation rules without descriptions, querying the ValidationRule object and filtering by Active = true and NamespacePrefix = null. These queries are part of a broader effort to document Salesforce configurations, ensuring knowledge is not confined to a few individuals. [1]
Advertisement
The article provides a Python script using pandas to compile the results from the CSV files into a list of components with missing documentation, grouped by the last person who modified them. The script reads CSV files for users, fields, and rules, mapping user IDs to names and checking for blank descriptions or help text. It generates a final CSV file called knowledge_gaps.csv, which lists each undocumented component along with the name of the last modifier, whether they are still active, and the last modification date. This output helps prioritize which components need documentation and which individuals should be consulted for explanations. The article emphasizes that the process should involve pairing sessions between senior and junior administrators to ensure knowledge transfer and documentation, rather than individual cleanup efforts. [1]
Custom fields without descriptions or help texts can be identified using a specific Tooling API query. This query selects custom fields where the NamespacePrefix is null, excluding managed packages, and filters for fields with empty Description and InlineHelpText fields. These fields often lack documentation, meaning their purpose is stored only in the memory of senior team members. Source ID 1 supports this information. [1]
Active flows without descriptions can be found using a SOQL query on the FlowDefinitionView object. This query filters for active flows and retrieves details such as ApiName, Label, Description, and LastModifiedBy. Flows without descriptions are particularly risky because they operate autonomously without clear documentation. Source ID 1 supports this information. [1]
Active validation rules without descriptions can be identified using a Tooling API query on the ValidationRule object. This query selects active validation rules with empty Description fields and excludes managed packages using the NamespacePrefix filter. Validation rules without descriptions may lead to unclear error messages, complicating user experience and troubleshooting. Source ID 1 supports this information. [1]
Advertisement
Custom fields without descriptions or help texts can be identified using a specific Tooling API query. This approach allows administrators to uncover fields that lack necessary documentation, which may leave their purpose and usage unclear to new team members. The query targets the CustomField object and filters out fields from managed packages by setting NamespacePrefix to null. The absence of descriptions and help texts typically indicates that the meaning of these fields resides solely in the memory of senior team members, creating potential risks for continuity and knowledge transfer. [1]
Active flows without descriptions can be found using a SOQL query on the FlowDefinitionView object. This query filters for active flows and retrieves details such as the flow’s API name, label, and the last modified by information. The lack of a description for a flow poses significant risks, as these components operate independently and may not be understood by other team members. This can lead to potential issues during system maintenance or when onboarding new administrators. [1]
Active validation rules without descriptions can be identified using a Tooling API query on the ValidationRule object. This query is designed to find validation rules that are currently active and lack a description. The absence of a description in these rules can lead to confusion among users, particularly when error messages such as 'Invalid value' appear without context. This lack of clarity can hinder troubleshooting and negatively impact user experience. [1]
Sources
Prepared with AI assistance from the cited sources.
The Cali Reporter newsletter
The stories worth your time.
California, the country, and what comes next. Join our free newsletter for reporting that keeps you informed.
More in Technology
- Modern Web Guidance 1.0 and Browser Compatibility
Modern Web Guidance 1.0, announced by Chrome for Developers on November 10, introduces browser compatibility data to assist coding agents in building web features. The initiative emphasizes the importance of fallback…
- Apache mod_http2 Vulnerability Detection with Nmap
A new Nmap scripting module has been developed to detect the Apache mod_http2 vulnerability (CVE-2026-119618), addressing the challenges of identifying affected systems accurately.
- Securing Remote Vendor Access in Industrial Networks
Best practices for managing remote vendor access in operational technology (OT) networks emphasize controlled access points, multifactor authentication, and time-bound sessions to reduce cybersecurity risks.
