You need to sign in to do that
Don't have an account?
Trigger selecting using multi-select picklist
trigger TestingSyntax on Lead (before insert) {
for (Lead a : Trigger.new) {
// the following gets no error but is not what I need.
Assignment__c AssignThis = [select Area_Account_Manager__c from Assignment__c where Country__c = :a.Country and brand__c = 'Edgecam'];
// the following causes the error "Save error: unexpected token: :"
//Assignment__c AssignThis = [select Area_Account_Manager__c from Assignment__c where Country__c = :a.Country and :a.brand__C in brand__c];
// or this alos get the same error.
//Assignment__c AssignThis = [select Area_Account_Manager__c from Assignment__c where Country__c = :a.Country and 'Edgecam' in brand__c];
}
}
Bill
List<Id> idList = new List<Id>();
idList.add(....);
.
.
[Select ... where Id in :idList].