Hi, I am trying to write a trigger to call a btach class if a check box is true, otherwise call the future class. but IDK what is wrong with my code I can't save it. please advise. here is my code:trigger ProjectSettings_ChartsTrigger on Project_Setting__c (After Insert,After Update){ List<id> ProjectIds = new list<id>(); List<Project_Setting__c > prj = [select Id, total_check__c from Project_Setting__c where Id In : ProjectIds]; for(Project_Setting__c PS : Trigger.new){ if (Project_Setting__c.total_check__c = true) { ProjectIds.add(PS.id); } ProjectSettings_ChartsBatchClass pro = new ProjectSettings_ChartsBatchClass(); database.executebatch(pro,2000);} if (Project_Setting__c.total_check__c = false){ projectSettingsChartClass.ProjectMethods(ProjectIds); } Thanks