I'm trying to add a value to a multi-select picklist with a batch class. The debug statement shows that its being added but it's not saving for some reason. Any ideas?
public class projectPatriotConTypeBatch implements Database.Batchable<sObject>, Database.Stateful {
public Database.QueryLocator start(Database.BatchableContext bc) {
return Database.getQueryLocator('SELECT Id, Current_Placement__r.Contractor_Type__c FROM JSO2__File__c WHERE Current_Placement__r.Contractor_Type__c excludes (\'Project Patriot\') AND Current_Placement__r.Contractor_Type__c != null');
}
public void execute(Database.BatchableContext BC, List<JSO2__File__c> efList){
for(JSO2__File__c ef : efList){
ef.Current_Placement__r.Contractor_Type__c += ';Project Patriot';
System.debug(ef.Current_Placement__r.Contractor_Type__c);
}
update efList;
}
public void finish(Database.BatchableContext BC){
}
}