You need to sign in to do that
Don't have an account?
Ritika Singh
Workflow with Trigger
The initial value for a number field on a record is 1. A user updated the value of the number field to 10. This action invokes a workflow field update, which changes the value of the number field to 11. After the workflow field update, an update trigger fires.
What is the value of the number field of the object that is obtained from Trigger.old?
A. Null
B. 11 (Since 11 will be the immediate previous value before update, so i am considering it correct)
C. 1
D. 10
Is it 11 or 1 ? And How ?
What is the value of the number field of the object that is obtained from Trigger.old?
A. Null
B. 11 (Since 11 will be the immediate previous value before update, so i am considering it correct)
C. 1
D. 10
Is it 11 or 1 ? And How ?
Answer is
C. 1
Refer the below Salesforce Document you will get the clear idea because same scenario is there. Please read the Additional Considerations last point.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm?search_text=immediately%20before%20the%20workflow%20update
In below post one guy posted the debug log also.
https://www.proprofs.com/discuss/q/503776/initial-value-number-field-record-user-updated-this-action-i
Thanks,
Maharajan,C
All Answers
Answer is
C. 1
Refer the below Salesforce Document you will get the clear idea because same scenario is there. Please read the Additional Considerations last point.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm?search_text=immediately%20before%20the%20workflow%20update
In below post one guy posted the debug log also.
https://www.proprofs.com/discuss/q/503776/initial-value-number-field-record-user-updated-this-action-i
Thanks,
Maharajan,C