View Categories

Metadata Validation Rules

< 1 min read

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 #

ParameterPurpose
@ObjectNameSalesforce Object Name (for example Account).alternatively pass “All” to retrieve all Objects.
@EnvSQL Sales Environment Name, see Setup
@Special1Future use, not currently used
@Special2Future 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 NamePurpose
ObjectNameSalesforce object the validation rule is defined on.
RuleNameAPI name of the validation rule.
ActiveWhether the validation rule is active (1 = active, 0 = inactive).
DescriptionDescription of the validation rule, typically used for admin documentation.
ErrorConditionFormulaLogic formula that determines when the validation rule is triggered.
ErrorMessageMessage displayed to the user when the validation rule is violated.
ErrorDisplayFieldField where the error message is displayed, if specified.

Leave a comment

Your email address will not be published. Required fields are marked *