You need to sign in to do that
Don't have an account?
paul.mag
Compare Picklist and MultiSelectPicklist values and update
Can anyone help me write a trigger that will update my Role_Level__c picklist with the value of strPortalRoleLevel__c picklist field if they do not match and if my checkbox intAutomaticallyUpdate__c is TRUE.
So
IF
intAutomaticallyUpdate__c = TRUE &&
Role_Level__c <> strPortalRoleLevel__c
Then
Update Role_Level__c with strPortalRoleLevel__c
Hopefully someone can help write this into an actual trigger, I also have some MSPL fields that will require the same / similar solution.
Thanks in advance
Paul
Here i can suggest one thing since you are comparing the pick list value with multiselect picklist value, so
get the mul pick value in to a string and then compare it with the picklist value
string str = Multipicklist value ; if it does not work type cast like this or str = string.valueof(multi pick value);
then
string st = Role_Level__c
str.Contains(string st)
intAutomaticallyUpdate__c = TRUE && NOT(str.Contains(string st))
The above is just my idea
If this solves your problem make this as a solution and give KUDOS Plz
for(Trigger.New) {
//Check for condition and set the value
}