Fetch Salesforce Validation Rules using Tooling API

Fetch Salesforce Validation Rules using Tooling API

Salesforce Validation Rules are stored in ValidationRule entity. So, we can query the ValidationRule entity to fetch Salesforce Validation Rules using Tooling API.

Query:

SELECT Id, FullName, ValidationName, ErrorMessage
FROM ValidationRule

Single Validation Rule:

/services/data/v48.0/tooling/sobjects/ValidationRule/03d5w0000006lVW

Multiple Validation Rule Tooling API Salesforce

/services/data/v48.0/tooling/query/?q=select+Id,Active,ValidationName+from+validationrule+where+id+in+(’03d5w0000006lVW’,’03d5w0000006lVR’)

Reference Article:

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_validationrule.htm

Leave a Reply