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
Ken CelmerKen Celmer 

Lead validation rule triggered on moving status make sure fields are not blank

Hi! 
I'm struggling with creating a field validation rule that requires multiple fields to be not blank if anyone moves the lead from "Unqualified" to "MQL".  I've cobbled the below together from a similar Opportunity validation rule but it does not work:

AND (
ISPICKVAL(Status, "MQL"),
ISPICKVAL(PRIORVALUE(Status), "Unqualified"),
NOT(ISBLANK(State)) 
NOT(ISBLANK(Industry))
)

Can anyone show me what I'm doing wrong?
TechingCrewMattTechingCrewMatt
Hi, Ken. It looks like you need to add an OR() statement to your formula as follows:
AND (
   ISPICKVAL(Status, "MQL"),
   ISPICKVAL(PRIORVALUE(Status), "Unqualified"),
   OR(
      ISBLANK(State),
      ISBLANK(Industry)
   ) 
)
This will cause an error when the Status is changed from "Unqualified" to "MQL" and either State or Industry is blank, null, or whitespace.

Thanks,
Matt