You need to sign in to do that
Don't have an account?
chaithaly gowda
Does 'After update' trigger fire even if the fileds dont get updated?
Hi
I have a trigger on event for after update , and inside the trigger i have given the condition if(trigger.isupdate){//statements}.
The scenario is, I am creating an event record , the after update trigger is executing the statements inside isupdate block in the same transaction.
Kindly help if i am missiong something.
Thanks
I have a trigger on event for after update , and inside the trigger i have given the condition if(trigger.isupdate){//statements}.
The scenario is, I am creating an event record , the after update trigger is executing the statements inside isupdate block in the same transaction.
Kindly help if i am missiong something.
Thanks
The update trigger was executing on insert because in the same transaction a workflow was updating the record,and as per the order of execution after trigger fired on record update due to workflow field update.
Noticed this with the debug log.
Thanks
All Answers
To my knowledge yes, but in case if you don't want to update you could compare the new value to the old value and then if there is any change then you could perform the logic, also tri checking the condition for trigger.isafter as well.
I hope this helps.
Regards,
Anutej
Please can you clear the exact scenario again. BUT meanwhile try writing the code in the trigger as below it might work as you may be missing this:
If ( Trigger.isUpdate && Trigger.isAfter ){
//STATEMENTS
}
If it work then please assign it as the best answer.
Thanks and Regards!
The update trigger was executing on insert because in the same transaction a workflow was updating the record,and as per the order of execution after trigger fired on record update due to workflow field update.
Noticed this with the debug log.
Thanks