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
Karthika A 7Karthika A 7 

This validation rule doesn't work

AND(
OR($Permission.ABC_Sales, $Permission.DEF_Sales),
NOT(ISPICKVAL((Campaign.Status),"Active"))
)

As a Sales User, I should only be able to ad Active Campaigns to an Opportunity. The above validation rule doesn't seem to work. Any suggestions?

 
Best Answer chosen by Karthika A 7
Maharajan CMaharajan C
Hi Karthika,

You formula looks fine. But am having the below question.

Do you have Active value is Campaign Status picklist ?  What about the standard Active checkbox field in Campaign Object. I hope you assigned the custom permissions to profiles
 
AND(
OR($Permission.ABC_Sales, $Permission.DEF_Sales),
NOT(Campaign.IsActive)
)

Thanks,
Maharajan.C

All Answers

Maharajan CMaharajan C
Hi Karthika,

You formula looks fine. But am having the below question.

Do you have Active value is Campaign Status picklist ?  What about the standard Active checkbox field in Campaign Object. I hope you assigned the custom permissions to profiles
 
AND(
OR($Permission.ABC_Sales, $Permission.DEF_Sales),
NOT(Campaign.IsActive)
)

Thanks,
Maharajan.C
This was selected as the best answer
Karthika A 7Karthika A 7
Hi Maharajan,
Thank you for the response. I didn't assign custom permission. I assigned it and it works fine now. Thank you. It worked