You need to sign in to do that
Don't have an account?
Ankit Khiwansara 10
Trigger.New Context
Hello Friends,
I am preparing for DEV 1 certification . While going over sample questions, came accross below question.
In which two trigger types a developer modify new sObjct Record that are obtained by trigger.new context.
A) After Insert
B) After Update
C) Before Update
D) Before Insert
I think ans for this is Before Update and Before Insert,
As record firre by after triggers are readonly since it has completed DB operation.
Could you please confirm whether my understanding is correct.
I am preparing for DEV 1 certification . While going over sample questions, came accross below question.
In which two trigger types a developer modify new sObjct Record that are obtained by trigger.new context.
A) After Insert
B) After Update
C) Before Update
D) Before Insert
I think ans for this is Before Update and Before Insert,
As record firre by after triggers are readonly since it has completed DB operation.
Could you please confirm whether my understanding is correct.
Greetings to you!
- Yes right, 'Before Update' and 'Before Insert' is used to modify new sObject Record.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Deepali Kulshrestha.
It's A and D because in the question they mention about "modify new sObjct Record",
And in the case of the update, the record is not new and it's going to be updated, so the answer is A and D.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi