Valid PDI Dumps shared by EduDump.com for Helping Passing PDI Exam! EduDump.com now offer the newest PDI exam dumps, the EduDump.com PDI exam questions have been updated and answers have been corrected get the newest EduDump.com PDI dumps with Test Engine here:
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?
Correct Answer: D
Recent Comments (The most recent comments are at the top.)
Noha - Sep 05, 2024
It's a before update trigger not before insert, the question is when inserting the Account. So i guess the answer is C as on Insert the workflow rule will update the count to 1 then the before update trigger will fire to update the count to 2
MD RIFAT ANWAR - May 28, 2024
A. 1
When an Account is inserted (created), the workflow rule will trigger because it is set to run on both create and update events. The trigger, however, is on the before update event, which does not fire on insert (create). Therefore, the trigger will not run when the Account is first created, only when it is updated.
Here's the sequence of events:
1. The Account is inserted with an initial count value of zero. 2. The workflow rule triggers on the insert event and increments the count field by 1. The count is now 1. 3. Since the workflow rule is configured to not re-evaluate workflow rules after the field update, it will not trigger itself again.
The trigger does not come into play because it is only set to run on the before update event, not on insert.
Hung Le - Mar 28, 2024
I misunderstand about the trigger. It's before trigger update, not before trigger insert As result Insert an Account -> work flow actives -> increments the count field (0->1) Execute Before Trigger Update -> continuously increments the count field (1->2) Answer is C
Im sorry it's response D because the before update trigger will fired again
Fa3il khayr - Feb 23, 2024
Should be C because the field is configured to not re-evaluate again when updated on the workflow .
-> when the Account enters the update transaction the before trigger gets fired and adds 1 --> ( 1 ) -> when an account is updated the workflow rule gets executed and updates the field by adding a 1 again --> ( 2 )
So normaly the workflows on the Account object won't re-evaluate again because it's configured to not re-evaluate workflow rules to prevent infinite looping on data
Recent Comments (The most recent comments are at the top.)
It's a before update trigger not before insert, the question is when inserting the Account.
So i guess the answer is C as on Insert the workflow rule will update the count to 1 then the before update trigger will fire to update the count to 2
A. 1
When an Account is inserted (created), the workflow rule will trigger because it is set to run on both create and update events. The trigger, however, is on the before update event, which does not fire on insert (create). Therefore, the trigger will not run when the Account is first created, only when it is updated.
Here's the sequence of events:
1. The Account is inserted with an initial count value of zero.
2. The workflow rule triggers on the insert event and increments the count field by 1. The count is now 1.
3. Since the workflow rule is configured to not re-evaluate workflow rules after the field update, it will not trigger itself again.
The trigger does not come into play because it is only set to run on the before update event, not on insert.
I misunderstand about the trigger. It's before trigger update, not before trigger insert
As result
Insert an Account -> work flow actives -> increments the count field (0->1)
Execute Before Trigger Update -> continuously increments the count field (1->2)
Answer is C
The answer is D.
You can review here:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm?_ga=2.264261770.465681680.1710726492-1136459429.1707115711
Im sorry it's response D because the before update trigger will fired again
Should be C because the field is configured to not re-evaluate again when updated on the workflow .
-> when the Account enters the update transaction the before trigger gets fired and adds 1 --> ( 1 )
-> when an account is updated the workflow rule gets executed and updates the field by adding a 1 again --> ( 2 )
So normaly the workflows on the Account object won't re-evaluate again because it's configured to not re-evaluate workflow rules to prevent infinite looping on data
For more details refer here :
https://help.salesforce.com/s/articleView?id=sf.workflow_field_updates_reevalute_wf.htm&type=5
Should be C
Response D is correct as after the workflow rule is executed, 'before update' triggers will fire again.
Response C :
2