Validation Rules (from the Metadata API)
Pull Validation Rules per Object, including rule logic, error messages, and active status, for all Objects or a specified Object.
Results are loaded to table ss_SysVR
Parameters
Parameter | Purpose |
@ObjectName | Salesforce Object Name (for example Account). alternatively pass "All" to retrieve all Objects. |
@Env | SQL Sales Environment Name, see Setup |
@Special1 | Future use, not currently used |
@Special2 | Future use, not currently used |
Example of Use - All
exec ss_MetaVR 'DEMO', 'All'
Example of Use - Single
exec ss_MetaVR 'DEMO', 'Account'
ss_SysVR table
Column Name | Purpose |
ObjectName | Salesforce object the validation rule is defined on. |
RuleName | API name of the validation rule. |
Active | Whether the validation rule is active (1 = active, 0 = inactive). |
Description | Description of the validation rule, typically used for admin documentation. |
ErrorConditionFormula | Logic formula that determines when the validation rule is triggered. |
ErrorMessage | Message displayed to the user when the validation rule is violated. |
ErrorDisplayField | Field where the error message is displayed, if specified. |