I need help creating a validation rule for a multi-select picklist.
I want users with a specific profile to only be able to add or remove one value. Can anyone help?
Field is Account_Classification__c
Value they can update is "Segmentation"
Profile must contain "Local"
Is it possible?
Thank you,
Katherine Mather
답변 14개
Okay this is a Dumpster Fire, but give this a try AND(
CONTAINS($Profile.Name, "Local"),
ISCHANGED(Account_Classification__c),
(
IF(INCLUDES( Account_Classification__c , "Key"), 1, 0) +
IF(INCLUDES( Account_Classification__c , "Target"), 1, 0) +
IF(INCLUDES( Account_Classification__c , "Secondary"), 1, 0) +
IF(INCLUDES( Account_Classification__c , "Extra"), 1, 0)
) <>
(
IF(INCLUDES( PRIORVALUE(Account_Classification__c) , "Key"), 1, 0) +
IF(INCLUDES( PRIORVALUE(Account_Classification__c) , "Target"), 1, 0) +
IF(INCLUDES( PRIORVALUE(Account_Classification__c) , "Secondary"), 1, 0) +
IF(INCLUDES( PRIORVALUE(Account_Classification__c) , "Extra"), 1, 0)
)
)