2 answers
James,. I tried to modify this trigger, but I was unsuccessful in modifying it. do you have an example of how I can modify this coding? I am using this trigger from approval or rejection of records.I followed your advice in step 2, but I am receiving errors, view below.trigger TriggerApprover on Matter__c (before update) { if(trigger.isUpdate){ List<Matter__c> MatterList = [Select id, (Select Id, Comments, FROM ProcessSteps ORDER BY CreatedDate DESC) From Matter__c WHERE ParentId in :Trigger.newMap.keySet()] ]; if(MatterList.size() > 0){ for(Matter__c mat : MatterList){ for(Matter__c mat1 : Trigger.new) { //check copy comment is true if(mat.id == mat1.id && mat1.Copy_Comment__c) { if (mat.ProcessSteps.size() > 0) { mat1.Approver_Comment__c = mat.ProcessSteps[0].Comments; mat1.copy_comment__c = false; } } } } } } }