function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rasmitha ReddyRasmitha Reddy 

Error During Create an save button

Hi

 

  Interview question: In a visual force page by using standard controller  created a save button and one user wants to use that page by using extension and again creats a save button then can we get any error  in this situation ? Can anybody answer it for me?

Best Answer chosen by Admin (Salesforce Developers) 
AdrianCCAdrianCC

Hello,

 

I think the question asks what method is called, if 2 methods with the same name(in this case save) are declared both in the standard controller and in an extension.

The answer is the method from the extension- it overrides the same named method from the controller.

 

So no error would be thrown.

 

Thanks,

Adrian

All Answers

AdrianCCAdrianCC

Hello,

 

I think the question asks what method is called, if 2 methods with the same name(in this case save) are declared both in the standard controller and in an extension.

The answer is the method from the extension- it overrides the same named method from the controller.

 

So no error would be thrown.

 

Thanks,

Adrian

This was selected as the best answer
Rasmitha ReddyRasmitha Reddy

Thanku somuch Adrian