What is the result when a visualforce page calls an Apex controller, - ProProfs Discuss
Topics
Products
Follow Us:

What is the result when a visualforce page calls an Apex controller, which calls another apexclass, which then results in hitting a governor limit?



A. Any changes up to the error are saved.
B. Any changes up to the error are rolled back.
C. All changes before a savepoint are saved.
D. All changes are saved in the first apex class.

This question is part of Platform Dev I
Asked by Faron, Last updated: Feb 17, 2020

+ Answer
Request

4 Answers

W. Pratt

Want to learn new things and share my knowledge

W. Pratt, Marketing Analyst, MBA, Lincoln

Answered Mar 20, 2019

The answer to this is C. There are times when you will be required to revert the partial work that you have already created towards into doing a certain task so that you can do a completely different task from the one that you have expected. Through APEX, you will have the ability to save the one that you have created so that all your efforts will not go to waste.

All of the data that you will create after the statement that you have created will be easily discarded especially if they are not needed for the process that you have in mind. It can be tricky to know when you should generate the save point but as long as you know the path that you want to do, it will not be too complicated anymore.

 

Suman Nandy

Suman Nandy

Answered Dec 06, 2018

C. All changes before a savepoint are saved.

Sometimes during the processing of records, your business rules require that partial work (already executed DML statements) be “rolled back” so that the processing can continue in another direction. Apex gives you the ability to generate asavepoint, that is, a point in the request that specifies the state of the database at that time. Any DML statement that occurs after the savepoint can be discarded, and the database can be restored to the same condition it was in at the time you generated the savepoint.

 

John Adney

John Adney

Answered Oct 29, 2017

B.Any changes up to the error are rolled back.

 

John Smith

John Smith

Answered May 30, 2017

Any changes up to the error are rolled back.
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.