Valid Plat-Dev-301 Dumps shared by EduDump.com for Helping Passing Plat-Dev-301 Exam! EduDump.com now offer the newest Plat-Dev-301 exam dumps, the EduDump.com Plat-Dev-301 exam questions have been updated and answers have been corrected get the newest EduDump.com Plat-Dev-301 dumps with Test Engine here:
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?
Correct Answer: A
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.