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
Rahul Luthra 1Rahul Luthra 1 

Validation rule on Multiselect Picklist

Hi All,

We have a multiselect field "Team data set" on Account with almost 15 values. Our requirement is :
  1. Not allow a user to ADD any of the values that begin with ‘ X Admin’ in the field ‘team data set’ on the account page, AND
  2. Not allow a user to REMOVE (already exist) any of the values that begin with ‘ X Admin’ in the field ‘team data set’ on the account page.
In short, we don't want a user to tag value starting from 'X - Admin' and if the values already exist we don't want a user to untag it.

TIA
Rahul

 
Ajay K DubediAjay K Dubedi
Hi Rahul,

This formula-field helps you to fulfill your requirement:
1. Create a multi-picklist 'Team Data Set' and gave default value as 'X Admin1'.
2. Error Condition Formula    :
OR(!INCLUDES(Team_data_set__c, 'X Admin1'),INCLUDES(Team_data_set__c, 'X Admin2'), INCLUDES(Team_data_set__c, 'X Admin3'), INCLUDES(Team_data_set__c, 'X Admin4'),INCLUDES(Team_data_set__c, 'X Admin5'))

3. Error Message:'X Admin' values are locked.

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
Deepali KulshresthaDeepali Kulshrestha
Hi Rahul,

In order to fulfill your requirement about the validations, you are trying to impose the validations. Going through different articles I found the thing closer to that you are trying to do.
Please refer to the following link as it may be helpful in solving your problem.
https://success.salesforce.com/answers?id=90630000000h1cIAAQ

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha