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
Rachel ZamoraRachel Zamora 

Validation Rule to block picklist values

I have a request to block our sales team from selecting certain values on the lead status. 
Only marketing should be able to select Prospect, Marketing Qualified, Engaged
Sales can select Sales Accepted and Not Qualified

When I try and create the validation rule I was running into a problem because once the lead status is at Marketing Qualified the sales rep is not able to convert the lead since the validation rule is triggering.  I'm only interested in blocking them from selecting the value but want to allow them to edit the rest of the data or change the lead status to one of thier allowed values:  Sales Accepted or Not Qualified.

AND(
$Profile.Name <> "Marketing",
$Profile.Name <> "Marketing User",
$Profile.Name <> "Marketo-Salesforce Sync",
OR(
ISPICKVAL(PRIORVALUE( Status) , "Sales Accepted"),
ISPICKVAL(PRIORVALUE( Status) , "Not Qualified"),
ISPICKVAL(PRIORVALUE( Status) , "Could Not Connect")
))
 
Best Answer chosen by Rachel Zamora
ArmouryArmoury
Can you check this.. 
AND( 
$Profile.Name <> "Marketing",
$Profile.Name <> "Marketing User",
$Profile.Name <> "Marketo-Salesforce Sync",
	AND(
		OR(
			ISNEW(),ISCHANGED(Status)
		), 
		OR( 
			ISPICKVAL(Status, "Prospect"), 
			ISPICKVAL(Status , "Marketing Qualified"), 
			ISPICKVAL(Status , "Engaged") 
		)
	)
)

All Answers

ArmouryArmoury
Can you check this.. 
AND( 
$Profile.Name <> "Marketing",
$Profile.Name <> "Marketing User",
$Profile.Name <> "Marketo-Salesforce Sync",
	AND(
		OR(
			ISNEW(),ISCHANGED(Status)
		), 
		OR( 
			ISPICKVAL(Status, "Prospect"), 
			ISPICKVAL(Status , "Marketing Qualified"), 
			ISPICKVAL(Status , "Engaged") 
		)
	)
)
This was selected as the best answer
aryan guptaaryan gupta
thanks for sharing this valuable article . i am happy to share my article independence day shayari (https://romanticshayri.in/happy-independence-day-shayari/) with you