
2 answers

Hi Rohit,Trigger.oldMap is only available in update and delete triggers. so you can't use in after insert,See the below links:https://trailhead.salesforce.com/en/apex_triggers/apex_triggers_introTrigger Context Variables (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_context_variables.htm)Regards,