+ Start a Discussion

Trigger Context Variables

Hi All 

I am trying to auto populate field from Obj B to Obj A. I have written a trigger,  which is working fine. But I only want to work for before insert and before Update. Can you anyone please help with the correct context variable that needs to used ?

I have used the following for before update it is working fine but not working for insert. Please help

if(trigger.isBefore && trigger.isUpdate){
Best Answer chosen by Ram_SF14
I found a way of doing it 

 if( trigger.isBefore){
    if( trigger.isInsert || trigger.isUpdate){
    } }

The above is working