You need to sign in to do that
Don't have an account?
DJP1S
Save error: Comparison arguments must be compatible types: Schema.SObjectField, String
I'm getting the topic title's error on my trigger logic - I'm just trying to filter out fields where the Month field is "Totals" before passing trigger.new to my class.
trigger ClientAnalyticsAfterInsertUpdateMonth on Client_Analytics__c (after insert, after update) { private ClientAnalyticsAfterUpdate caau; if(Client_Analytics__c.Month__c == 'Totals'){ if (trigger.isAfter) { if (trigger.isUpdate || trigger.isInsert) { caau = new ClientAnalyticsAfterUpdate(trigger.new); } } } }
Hi,
since all triggers are bulk triggers by default, you must process them in a loop.
Example:
for (Client_Analytics__c ca : Trigger.new) {
if(ca.Month__c == 'Totals') {
...
}
}
Good luck!
Marco
All Answers
Hi,
since all triggers are bulk triggers by default, you must process them in a loop.
Example:
for (Client_Analytics__c ca : Trigger.new) {
if(ca.Month__c == 'Totals') {
...
}
}
Good luck!
Marco
Oh duh - thanks!