function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
When Trigger.IsInsert and Trigger.IsUpdate fires?
Is it 'before' event or 'after' event or both?
For both
When you use two events (after insert,after update)
Then for isInsert() it will execute when it is called on insertion and same as update.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
"Trigger.IsInsert" and "Trigger.IsUpdate" are both trigger Context Variables and These variables are contained in theSystem.Triggerclass.
"Trigger.IsInsert " returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or the API.
"Trigger.IsUpdate" returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or the API.
These variables are applicalbe for both "before" and "after" event as well.
For better understanding please go through below link
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm
Best
Sagarika Rout
Associate Salesforce Consultant
For both
When you use two events (after insert,after update)
Then for isInsert() it will execute when it is called on insertion and same as update.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
"Trigger.IsInsert" and "Trigger.IsUpdate" are both trigger Context Variables and These variables are contained in theSystem.Triggerclass.
"Trigger.IsInsert " returns true if this trigger was fired due to an insert operation, from the Salesforce user interface, Apex, or the API.
"Trigger.IsUpdate" returns true if this trigger was fired due to an update operation, from the Salesforce user interface, Apex, or the API.
These variables are applicalbe for both "before" and "after" event as well.
For better understanding please go through below link
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_context_variables.htm
Best
Sagarika Rout
Associate Salesforce Consultant
Ie: IF (Trigger.isInsert OR Trigger.isUpdate) {}
Or something like
IF (Trigger.isBefore AND Trigger.isInsert) {}
?