---
title: Metadata Validation Rules
description: "Table of Contents - [Validation Rules (from the Metadata API)](#validation-rules-from-the-metadata-api) - [Parameters](#parameters) - [Example of Use - All](#example-of-use--all) - [Example of Use - Single](#example-of-use--single) - [ss_SysVR table](#sssysvr-table) ## **Validation Rules (from the Metadata API)** Pull Validation Rules per Object, including…"
url: "https://sql-sales.com/docs/metadata-validation-rules/"
updated: "2026-08-31"
category: Metadata
---

# Metadata Validation Rules

Table of Contents

- [Validation Rules (from the Metadata API)](#validation-rules-from-the-metadata-api)
- [Parameters](#parameters)
- [Example of Use - All](#example-of-use--all)
- [Example of Use - Single](#example-of-use--single)
- [ss_SysVR table](#sssysvr-table)

## **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**

|  |  |
| --- | --- |
| **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. |
