Top 10 Visualforce questions with answers

Top 10 Visualforce questions with answers

Below is the list of Top 10 Visualforce questions with answers. This quiz will test your knowledge about standard controllers, custom controllers and controllers extensions. Here are the questions:

Question 1: Which of the following is related to View layer in MVC Model ?
A. Workflow Rules

B. Validation Rules

C. Visual force Pages

D. Custom Objects

E. Apex Class

Answer: C

 

Question 2: Which of the following represents controller in Model – View – Controller Model ?
A. Tabs

B. Page Layouts

C. Custom Fields

D. Visual Force Pages

E. Apex Classes

Answer: E

 

Question 3: What is a Standard List controller?
A. Standard List Controller allows to display list of records in visualforce page.
B. Standard List Controller  provides the salesforce in built functionality to interact with visualforce pages.
C.Standard List Controller is an apex class that implements customized logic to visualfore pages.

Answer: A

 

Question 4: How to associate a standard List controller with visualforce page?
A. <apex:page standardController=”Account”>
B. <apex:page standardController=”Account” recordSetVar=”accounts”>
C.  <apex:page controller=”Account” >
D.  <apex:page Controller=”MYControllerName” extensions=”Class1, Class2,..”>

Answer: B

 

Question 5: How to associate a standard controller with Visualforce page?

A. <apex:page standardController=”Account”>
B. <apex:page standardController=”Account” recordSetVar=”accounts”>
C.  <apex:page controller=”Account” >
D.  <apex:page Controller=”MYControllerName” extensions=”Class1, Class2,..”>

Answer: A

 

Question 6: How to associate a custom controller with visualforce page?

A. <apex:page standardController=”Account”>
B. <apex:page standardController=”Account” recordSetVar=”accounts”>
C.  <apex:page controller=”Account” >
D.  <apex:page Controller=”MYControllerName” extensions=”Class1, Class2,..”>

Answer: C

 

Question 7: Which of the following syntax is wrong?

A.<apex:page standardController=”ControllerName” extensions=”Class1, Class2,..”>

B.<apex:page Controller=”MYControllerName” extensions=”Class1, Class2,..”>

C. <apex:page standardController=”MYControllerName” Controller=”MyController”>

Answer: C

 

8: What happens if you use the standard controller on a page and the user doesn’t have access to the object?

A. The page will display a insufficient privileges error.

B. You won’t get any error.

Answer: A

 

Question 9: True/False: custom controllers execute in system mode.

A. False

B. True

Answer: B

 

Question 10:True/False: standard controller execute in system mode

A. True

B. False

Answer: False. Standard controllers execute in user mode (with sharing).

 

Checkout the complete course : https://courses.mytutorialrack.com/p/visualforce-tutorial-for-beginners

Leave a Reply

Close Menu