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
SN SFSN SF 

Restrict user from Selecting certain values from Multiselect picklist

Hi , 

I have a Multiselect picklist with almost 50+ values (ex.: A,B,C,D etc)
I should allow user to select only A,B OR C .. If they choose values apart from A,B,C , then I should throw a Validation Error . 

Can you please suggest me how to accomplish this?

Regards,
SN
ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

Please refer the suggested formula in the below thread:

https://trailblazers.salesforce.com/answers?id=9063A000000iex9QAA

Please mark it as best answer if it helps you to fix the issue.

Thank you!

Regards,
Shirisha Pathuri
VinayVinay (Salesforce Developers) 
Try below snippet
AND(NOT(OR(INCLUDES(Multiselect__c,'A'),INCLUDES(Multiselect__c,'B'),INCLUDES(Multiselect__c,'C'))))

Thanks,
CharuDuttCharuDutt
Hi SN SF
Try The Following Validation Formula
NOT(OR(INCLUDES( MultiPicklist, 'A'),INCLUDES( MultiPicklist, 'B'),INCLUDES( MultiPicklist, 'C')))
Please Mark It As Best If It Helps.
Thank You!
 
fsagfd gfdshgfsagfd gfdshg
There are many optins availbale online to add the static script. I have tried for irwell hills (https://www.irwellhills.com/). You can see on link.