+ Start a Discussion
ashish raiashish rai 

Validation Rule of Picklist

Hi All,

I want three fields should be mendatory once the Stage(picklist) is declined. These three fields are of type Lookup,Text and Number.

Best Answer chosen by Admin (Salesforce Developers) 
Navatar_DbSupNavatar_DbSup

Hi,


Try the below validation rule:
if( ISPICKVAL(Stage__c , 'Declined/Dead'),
if(Source_Company__c <> null,
if( text(EBIT__c) <> null,
if(Source_Name__c <> null,
false,true),true),true),false)


Here Stage__c is picklist, Source_Company__c is lookup, EBIT__c is number and Source_Name__c is of text type.

All Answers

randombardrandombard

Just to clarify you want three different fields to be required if the stage is set to "declined"?

 

If that's the case then you have 2 options;

 

1 put one rule in place and in the error message describe name all three fields you want updating.

2 make three rules all with the same formula/criteria and select the specific fields for the error message to appear against.

 

Either way the rule you need is:

 

 ISPICKVAL( StageName, "declined")

 

R

Navatar_DbSupNavatar_DbSup

Hi,


Try the below validation rule:
if( ISPICKVAL(Stage__c , 'Declined/Dead'),
if(Source_Company__c <> null,
if( text(EBIT__c) <> null,
if(Source_Name__c <> null,
false,true),true),true),false)


Here Stage__c is picklist, Source_Company__c is lookup, EBIT__c is number and Source_Name__c is of text type.

This was selected as the best answer
randombardrandombard

wow yes,

 

I completly failed to paste the entire rule.

 

*sigh* that will teach me to read before I press post.