Exam Plat-Dev-301 Topic 1 Question 123 Discussion
Actual exam question for Salesforce's Plat-Dev-301 exam
Question #: 123
Topic #: 1
Question #: 123
Topic #: 1
A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and 5P3 {created in order), before the final execution of the process.
During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls 2 roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a Funtime error occurs.
Why does the developer receive a runtime error?
During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls 2 roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a Funtime error occurs.
Why does the developer receive a runtime error?
Suggested Answer: A Vote an answer
Savepoints in Apex are markers within a transaction and rolling back to an earlier savepoint (SP1) invalidates any savepoints created after it. Thus, SP3 is invalidated when the code rolls back to SP1, causing a runtime error when a rollback to SP3 is attempted.
by Darren at Aug 22, 2026, 01:00 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).