Hope you are all fine,
I'm doing a validation rule over a multi-select picklist that should avoid to be changed on certain substatus. Validation rule is a as follows:
AND(
$Profile.Name <> "System Administrator",
ISCHANGED(substatusRoofer__c),
OR(
CONTAINS( PRIORVALUE ( substatusRoofer__c), "Alta de candidato roofer"),
CONTAINS( PRIORVALUE ( substatusRoofer__c), "1")
)
)
Here i used both API Name and label, just in case, but the weird part is in log:
Profile.Name=Administrador del sistema , substatusRoofer__c=0AAB0AAC VALIDATION_PASS
I thought it could be hexadecimal, but is not, looks more like the order Salesforce establish over positions in the multi-select picklist, so in this case:
- 0AAA would be non selected
- 0AAB would be first value selected
- OAAB0AAC would be first and second values selected
I don't know if anyone could give me the right approach on how to do a validation rule that actually works, or understand why is Salesforce checking over the position in the picklist of the values selected.
Thanks!