I have written a trigger to insert records in child object based on some conditions in parent record but only able to insert records for existings accounts not for newly created accounts. Can anyone help me that where wil be the issue ?? trigger AccountTrigger on Account (before insert,after insert, after update) { List accountList = trigger.new;//no need // Initialising the custom object list to store the records List childAccToBeCreated = new List(); Map childselectionMap = new Map(); // This loop will iterate on the List accountList and will process each record for(Account acc: accountList){ Account oldAcc = new Account(); if(trigger.oldMap!=null){ oldAcc = trigger.oldMap.get(acc.ID); } if(oldAcc==null || acc.Fruits__c!=oldAcc.Fruits__c){ List selections = acc.Fruits__c.split(';'); childselectionMap.put(acc.Id, selections); } } for(Id ids: childselectionMap.keyset()){ } if(childAccToBeCreated!=null){ insert childAccToBeCreated; } }