Play Games

Search This Blog

Showing posts with label How to retrieve validation rule using package.XML in vs code Salesforce. Show all posts
Showing posts with label How to retrieve validation rule using package.XML in vs code Salesforce. Show all posts

Thursday, January 21, 2021

How to retrieve validation rule using package.XML in vs code Salesforce - Salesforce Globe For You

 How to retrieve validation rules using package.xml in vs code salesforce  - Salesforce Globe For You 

Problem: Assume a validation Mobile_Number_Required is written on the Lead object.Now we need to retrieve that validation rule in vs code tool using package.xml



Solution: Use name as ValidationRule and member as objectName.validationName as shown below.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<Package xmlns="http://soap.sforce.com/2006/04/metadata"><types>

     <members>Lead.Mobile_Number_Required</members>

        <name>ValidationRule</name>

    </types>

    <version>48.0</version>

</Package>

Output: