+ Start a Discussion
Sebastien RaouxSebastien Raoux 

Validation Rules for opportunty stage

Hi

i m trying to create a validation rule that says if 4 fields are not filled, the user cannot mark stage as complete 
the formula is simple ( i took example on many answers here on this forum ) 

AND 
(
OR
(
ISPICKVAL(StageName, "Discovery Call"), 
BANT__c = FALSE, 
ISBLANK(DiscoveryCallMinutes__c), 
Goal_letter__c = FALSE, 
ISBLANK( Scheduled_next_meeting__c ) 

)

this should mean that if the user is on the stage Discovery call (and only on this stage ) and all the fields:  scheduled next meeting - Goal letter - Dsicovery call minutes and BANT are not checked or filled , the stage cannot be marked as completed ..


but this formula doesn t work ... 

any advice ? 
IshwarIshwar
Try this:
AND(
ISPICKVAL(StageName, "Discovery Call"),
OR
 ( 
 BANT__c = FALSE, 
 ISBLANK(DiscoveryCallMinutes__c),  
 Goal_letter__c = FALSE, 
 ISBLANK( Scheduled_next_meeting__c ) 
 )
)
 
Sebastien RaouxSebastien Raoux
I must have done a mistake in the setup of the path cause it s still not working . 
i tested it and was able to mark the discovery call stage as completed without filling anything .. 

any idea what could i have done wrong ? i have no syntax error so the stage seems to be in place . 
IshwarIshwar
What I understnad now is, you are trying to change StageName from Discovery Call to Complete and you are expecting an error mesage..is that correct?
Sebastien RaouxSebastien Raoux
yes but only if the 4 fields mentionned are not checked or filled .
if one or 2 or 3 are missing i should have the error 
IshwarIshwar
Try this:
If stage is changed AND it is changed from Discovery call to Completed AND if one of the 4 fields is blank.. then give error

AND(
ISCHANGED(StageName),
ISPICKVAL(StageName, "Completed"),
PRIORVALUE(StageName)='Discovery Call',
OR
 ( 
 BANT__c = FALSE, 
 ISBLANK(DiscoveryCallMinutes__c),  
 Goal_letter__c = FALSE, 
 ISBLANK( Scheduled_next_meeting__c ) 
 )
)
Sebastien RaouxSebastien Raoux
THanks Ishwar, it works fine