You need to sign in to do that
Don't have an account?
Timothy Smith
Comparison arguments must be compatible types -- String
The field, Milestone1_Project__c.Implementation_status__c, is a Picklist in my If/Else statement used for comparison. To my understanding I would treat it as a String. However I am receiving:
Comparison arguments must be compatible types: Schema.SObjectField, String
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage(); if(Milestone1_Project__c.Implementation_status__c == 'LIVE - TRANSITION'){ // Set Outgoing Email to Implementation Coordinator //message.toAddresses = new String[] { 'test@test.com' }; } else if (Milestone1_Project__c.Implementation_status__c == 'Live'){ // Private method *** getAddresses() *** retrieves email address from Customer_Success_Managers Public Group //message.toAddresses = new String[] { 'test@test.com' }; }
All Answers