function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DivsDivs 

Validation rule

Hi,

 

I have created a field called lead status it is a picklist  value so if the value is equal to closed converted then the other field should be filled..

 

How can i write a validation rule for this..Any one help....

Best Answer chosen by Admin (Salesforce Developers) 
Ankit AroraAnkit Arora

IF( TEXT(STATUS_API_NAME) == 'Closed Converted' && ISBLANK(YOUR_OTHER_FIELD_API_NAME) , true , false)

 

Try this, replace 

 

STATUS_API_NAME with your picklist api name

Closed Converted with the value which you want to compare

YOUR_OTHER_FIELD_API_NAME with the field api name which should not be empty.

 

 

Thanks
Ankit Arora

 

All Answers

Ankit AroraAnkit Arora

IF( TEXT(STATUS_API_NAME) == 'Closed Converted' && ISBLANK(YOUR_OTHER_FIELD_API_NAME) , true , false)

 

Try this, replace 

 

STATUS_API_NAME with your picklist api name

Closed Converted with the value which you want to compare

YOUR_OTHER_FIELD_API_NAME with the field api name which should not be empty.

 

 

Thanks
Ankit Arora

 

This was selected as the best answer
DivsDivs
Thanks Ankit its working
Ankit AroraAnkit Arora

You are most welcome :)

 

 

Thanks
Ankit Arora

 

jen-gjen-g

I was attempting to create the same rule using different fields and contingencies.  After hours of sorting through the sample validation rules, and having no succes, and calls and emails between myself and support, i was directed to this board.  I found your thread and tried your rule, and voila!  We have success!  Thank you, thank you, thank you! 

DivsDivs

Hi ,

 

I tried this same for opportunity its not working.

 

 IF( TEXT( Probability ) == ' 0 ' && ISBLANK( Reason_for_Lost__c ) , true , false)


Please help.!!