Saturday, 10 November 2012

Before event in trigger

* In before mode of the trigger, If you are trying to update records of the object on which you are performing the trigger operation then no need to use DML statements manually, automatically salesforce will update those records.
* If you are trying to update other object records then you should use DML statements.
--------------------
* Suppose one of the record which is not there in sObject based on that record only if you can perform operation(like inserting other records based on that record), in this case :
insert record in before mode(Trigger.isBefore) then based on that record you can insert other records in after mode(Trigger.inAfter)
--------------------

No comments:

Post a Comment

Labels