1

I want to fire validation rule when opportunity stage is moving from Customer Intake to Opps Planning.

When opportunity stage change it should check that Account.Mask_Manufacturer_Model__c is not null when Respiratory__c =true.

What i have done so far is as below any idea how can i achieve that?

IF(ISPICKVAL(StageName ,'Opps Planning' ), 
ISBLANK( Account.Mask_Manufacturer_Model__c ), Respiratory__c =true)

1 Answer 1

2

You need to Add OR condition. If your stage is Opps Planning and any one Mask_Manufacturer_Model__c null or Respiratory__c false then fire validation rule..

AND(ISPICKVAL(StageName ,'Opps Planning') , 
 OR(ISBLANK( Account.Mask_Manufacturer_Model__c ), Respiratory__c =false))

Updates

Use PRIORVALUEfuction to check old value

AND(ISPICKVAL(StageName ,'Opps Planning') ,
     ISPICKVAL(PRIORVALUE(StageName ),"Customer Intake"),
 OR(ISBLANK( Account.Mask_Manufacturer_Model__c ), Respiratory__c =false))

,

8
  • In this where it check that it will fire only when opp stage change Customer Intake to Opps Planning. Mar 3, 2016 at 3:31
  • ALso tried what you told but getting and error like Error: Syntax error. Missing ')'. If i add missing syntax then i am getting another error like Error: Incorrect number of parameters for function 'ISPICKVAL()'. Expected 2, received 3 Mar 3, 2016 at 3:34
  • All right, This is working fine, but what i am saying is there are multiple stage, this will fire when any stage change to opps planning, i want to fire this only when Customer Intake stage change to Opps Planning. Mar 3, 2016 at 3:38
  • Thanks a lot, appreciate that. Thats working like charm. Thanks again. Mar 3, 2016 at 3:43
  • 1
    I got this, changed OR to AND, works fine now. Thanks Mar 3, 2016 at 4:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .