You need to sign in to do that
Don't have an account?
pcmca_2007@yahoo.co.in
Insert Event and Trigger.new
Hi All,
Can anybody tell me what is the difference in using Trigger.new with Before Insert and After Insert.In which condition
Trigger.new used either with Before Insert or After Insert.Is any difference in the state of data during these two event?
With Regards
Prabhash Mishra
trigger.new can be used in both of the triggers before insert and after insert the only diffrence would be that you can not access Id field in before insert trigger.
Like in this trigger c.id will be nul in case of before insert trigger that means insertion is in progress and fields can be validated or altered using any logic.
In this in case of before insetrt size will be 0 and in case of after insert size will be the number of items in trigger.new
With before insert u can use trigger.new to make changes to record. But with after insert u need to use update DML statement to make changes to the record.
ApeX trigger this might be of use