1Z0-336 · Question #46
You are asked to create a Trigger on an Opportunity Object. It should check if there is a change in the value of the Priority field in the current transaction. If Yes, then if the new value is…
The correct answer is A. After Changes Posted to Database. Explanation/Reference: After Changes Posted to Database: Fires after all changes have been posted to the database, but before they are permanently committed. Can be used to make additional changes that will be saved as part of the current transaction. Not B: Before Commit in…
Question
You are asked to create a Trigger on an Opportunity Object. It should check if there is a change in the value of the Priority field in the current transaction. If Yes, then if the new value is greater than older value, update the Additional Info field with the value Higher Priority. Which trigger should you use? (Choose the best answer.)
Options
- AAfter Changes Posted to Database
- BBefore Commit in Database
- CAfter Insert into Database
- DBefore Update in Database
- EAfter Update in Database
How the community answered
(15 responses)- A80% (12)
- B7% (1)
- D13% (2)
Explanation
Explanation/Reference: After Changes Posted to Database: Fires after all changes have been posted to the database, but before they are permanently committed. Can be used to make additional changes that will be saved as part of the current transaction. Not B: Before Commit in Database: Fires before the change pending for the current object (insert, update, delete) is made permanent in the current transaction. Any changes made in this trigger will not be part of the current transaction. Use "After Changed Posted to Database" trigger if your trigger needs to make
Topics
Community Discussion
No community discussion yet for this question.