+ Start a Discussion
Ritika SinghRitika 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 ?
Best Answer chosen by Ritika Singh
Maharajan CMaharajan C
HI Ritika,

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

Maharajan CMaharajan C
HI Ritika,

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
This was selected as the best answer
Lora BrownLora Brown
I remember I subscribed to your page last time and as I started working for homework help online in AU (https://do-my-assignment.com/homework-help-australia/) so at the same moment I got the notification of your post. It's a remarkable post for all business hunters. A good job is done. Thank you.