How to Validate the Lead Record When Click the Convert Button in Salesforce



In Salesforce we can convert the leads based on Lead’s Field Value. To set up this we can use the below validation rules.

In this example we used the custom field as “Lead Qualified” is equal to “Yes”

Step 1 : Go to Setup

Step 2 : Click Object Manager

Step 3 : Select Lead Object

Step 4 : Create a Validation rule

Error Condition Formula :

AND( IsConverted, NOT( TEXT( PRIORVALUE(Lead_Qualified__c) ) = “Yes”) )

Step 5 : Click save

If the Lead Qualified field value is not equal to Yes. Then the below error will occur when doing convert action.

 

If the Lead Qualified field value is “Yes” then it will be converted successfully.