You need to sign in to do that
Don't have an account?
jeazy
Compile Error: AND operator can only be applied to Boolean expressions
Please help!! This is the if statement in a trigger:
if((c.RecordTypeId == caseRTypeMap.get('Promotions') && c.S_Category__c != 'Draft Kit') || (c.RecordTypeId = caseRTypeMap.get('Fantasy') && c.S_Category__c == 'Referral, Trophy')){
c.Queue__c = '(Fulfillment) Promotions';
}
This is the error message I am getting:
“Error: Compile Error: AND operator can only be applied to Boolean expressions at line 400 column 191”
Thanks in Advance,
if((c.RecordTypeId == caseRTypeMap.get('Promotions') && c.S_Category__c != 'Draft Kit') || (c.RecordTypeId = caseRTypeMap.get('Fantasy') && c.S_Category__c == 'Referral, Trophy')){
c.Queue__c = '(Fulfillment) Promotions';
}
This is the error message I am getting:
“Error: Compile Error: AND operator can only be applied to Boolean expressions at line 400 column 191”
Thanks in Advance,
You're missing an "=" here:
changing it to the following should work:
All Answers
You're missing an "=" here:
changing it to the following should work:
I see c.RecordTypeId = caseRTypeMap.get('Fantasy') which is obviously not a boolean expression. Maybe you can try to replace "=" with "=="?
Cheers!
I totally missed the "=="