Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 247 discussion

Actual exam question from Salesforce's CRT-450
Question #: 247
Topic #: 1
[All CRT-450 Questions]

A developer has two custom controller extensions where each has a save() method.

Which save() method will be called for the following Visualforce page?

  • A. ExtensionA save()
  • B. ExtensionB save()
  • C. standard controller save()
  • D. Runtime error will be generated
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
ryuu
Highly Voted 3 years, 5 months ago
Why not A?
upvoted 11 times
tapasroy
2 years, 7 months ago
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm Overrides are defined by whichever methods are defined in the “leftmost” extension, or, the extension that is first in the comma-separated list. Thus, the save method of extensionA is overriding the method of extensionB.
upvoted 4 times
...
Ganmook
3 years, 2 months ago
You are right, answer is A. This is followed link about that. https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
upvoted 11 times
...
...
noox
Highly Voted 2 years, 10 months ago
Selected Answer: A
You can override save method with extension, and "leftmost" extension gets the priority over the rest.
upvoted 6 times
BrucePark
1 year, 3 months ago
But it says they have save methods. So the method in standardcontroller is never invoked.
upvoted 1 times
...
...
irina_735
Most Recent 1 year, 2 months ago
Selected Answer: A
Overrides are defined by whichever methods are defined in the “leftmost” extension, or, the extension that is first in the comma-separated list: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
upvoted 1 times
...
ApexMike
2 years, 1 month ago
Selected Answer: A
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm
upvoted 1 times
...
JCTheGenius
3 years, 2 months ago
I think it is C because standardController is coming first and has a Save action. If it had not then it would have been the action of the first declared extension.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

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.

SaveCancel
Loading ...