Visualforce Interview Questions And Answers 2018

Visualforce Interview Questions And Answers 2018. Here Coding compiler presenting a list of 45 Visualforce Interview Questions. We hope that these Salesforce Visualforce interview questions will help you to crack your nex Visualforce job interview. All the best for your future and happy learning.

Visualforce Interview Questions

  1. What is Visualforce?
  2. What is visualforce controller in salesforce? What are they?
  3. What is Standard Controller?
  4. What is Standard List Controller?
  5. What is Custom Controller?
  6. Can we use standardController & controller attributes at a time?
  7. What are the tasks of standard controller?
  8. How can you create visualforce page in Salesforce?
  9. What is <apex:page> tag in visualforce markup?
  10. How can we enable visualforce editor?
  11. What are expressions used in pages to bind in controllers?
  12. What is the purpose of controllers?

Visualforce Interview Questions And Answers

Question # 1. What is Visualforce?

Answer # Visualforce is tag based markup language to develop customized user interface in salesforce.

Question # 2. What is visualforce controller in salesforce? What are they?

Answer # Visualforce controller is a set of instructions that specify what happens, when user interacts with components on visualforce pages, such buttons & links.

There are three types of controllers. They are.

Standard Controller, Custom controller & Controller extensions.

Question # 3. What is Standard Controller?

Answer # Standard controller provides the salesforce in built functionality to interact with visualforce pages. You can use the standard actions like Save, Edit, Cancel & delete by using standard controllers.

Syntax : <apex:page standardController=”Account”>

Question # 4. What is Standard List Controller?

Answer # Standard List Controller allows to display list of records in visualvalfoce page. Standard list controller provides additional pagination actions (First, Lat, Next & Previous) compared to standard controller.

Syntax: <apex:page standardController=”Account” recordSetVar=”accounts”>

defining this controller is similar to standard controller. But need to add one more attribute recordSetVar

Question # 5. What is Custom Controller?

Answer # Custom controller is an apex class that implements customized logic to visualfore pages.

We can override or create new functionality by using custom controllers.

Syntax: <apex:page controller=”Account” >

Question # 6. Can we use standardController & controller attributes at a time?

Answer # No, We cannot reference both attributes at a time.

See below syntax to under stand

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

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

<apex:page standardController=”MYControllerName” Controller=”MyController”> Wrong

Visualforce Interview Questions And Answers

Question # 7. What are the tasks of standard controller?

Answer # Standard controllers provides ability to access and interact with structured business data contained in records displays in the proper user interface.

Standard controller tasks: controlling data, controlling actions and controlling navigation.

8. How can you create visualforce page in salesforce?

We can create visualforce pages in two ways.

1. From the setup menu go to Setup-> develop -> Build->Pages-> click on new button to create a page & enter name & code for visualforce page.

2. From the vsualforce editor. Enter /apex/pagename at the url & create new page in visualforce editor.

Question # 9. What is <apex:page> tag in visualforce markup?

Answer # This tag represents a single visualforce page. Every page must start & end with this tag.

<apex:page>

<!– Body of the page –>

</apex:page>

Visualforce Interview Questions And Answers

Question # 10. How can we enable visualforce editor?

Answer # We need to check the “development mode” check box at user level to enable visualforce editor.

To enable this, go to user details page check the development mode check box.

 

Salesforce Visualforce Interview Questions And Answers

Question # 11. What are expressions used in pages to bind in controllers?

Answer # Using methods we can bind.
Getter:Will return value from controller to vf page
Setter:Will pass value from vf page to controller
Action:Will redirect to another page.

Visualforce Interview Questions And Answers
Question # 12. What is the purpose of controllers?

Answer # Controllers provide the data and actions that are available to a Visualforce page.

Question # 13. Which objects have associated standard controllers?

Answer # All standard and custom objects that can be accessed via the API have associated controllers

Question # 14. What is included with each standard controller?

Answer # Data: the fields for the associated object record that are API accessible, including the related records (5 up/1 down). Actions: save, delete, view, edit, cancel.

Visualforce Interview Questions And Answers
Question # 15. When do you need to go beyond a standard controller and code custom Apex?

Answer # If you need data beyond the limits of what is available in the standard controller or actions that go beyond the provided standard actions.

Question # 16. Compare and contrast custom controllers and controller extensions. How are they the same? How are they different?

Answer # Both allow for custom code to be used, allowing for custom data sets and custom actions. Extensions leverage the existing data and actions within a standard or custom controller.

Custom controllers must contain all data and actions that need to be executed by the page. Extensions that extend standard controller allow for the pages which use those extensions to be used in custom buttons, standard button overrides, and over declarative features.

Visualforce Interview Questions And Answers
Question # 17. What identifies a controller as being an extension?

Answer # The controller must declare a constructor which takes another controller explicitly. For example: public myControllerExtension(ApexPages.StandardController stdController) {this.acct = (Account)stdController.getRecord(); }

Question # 18. Why are properties helpful in controllers?

Answer # Properties can automatically create standard getters and setters while still allowing for their customizations. They save you from both writing the tedious code and reading the clutter when reviewing code.

Question # 19. In what order do methods fire within a controller?

Answer # The only rule is that setters fire before action methods. Aside from that, there is no guaranteed order.

Visualforce Interview Questions And Answers
Question # 20. What are some Apex classes that are commonly used within controllers?

Answer # StandardController, SelectOption, PageReference, Message, etc.

 

Visualforce Interview Questions And Answers For Experienced

Question # 21. How are wizard controllers different from other controllers?

Answer # The two main issues is that they must handle multiple pages and they must maintain the state across those pages.

Question # 22. What are the effects of using the transient key word?

Answer # The transient key word prevents the data from being saved into the view state. This should be used for very temporary variables.

Question # 23. When is a component controller required for custom components?

Answer # A component controller is required when business logic is required to decide how to render the component.

Visualforce Interview Questions And Answers
Question # 24. What kind of content can be included in a Visualforce page?

Answer # Any content that can be rendered in a browser (HTML, JavaScript, etc.).

Question # 25. What do {!expressions} refer to when used in Visualforce components?

Answer # Expressions refer to either data or actions that are made available to the page from the controller

Question # 26. What are the ways that Visualpages can be incorporated into the rest of your user interface?

Answer # Basically, via links, buttons, tabs, and inline frames.

Question # 27. Is it always necessary to know Apex to create Visualforce pages? When does it become necessary?

Answer # No, it is not always necessary. You can use standard controllers and VF component tags to accomplish quite a bit. Apex becomes necessary when you need either a custom set of data or custom actions to be available from the page.

Visualforce Interview Questions And Answers
Question # 28. What are attributes? What is the syntax for including them?

Answer # Attributes are modifiers to the main tag that belong after the tag name in the start tag. The syntax is attributeName=“attributeValue”

Question # 29. What are three types of bindings used in Visualforce? What does each refer to?

Answer # Data bindings refer to the data set in the controller.
Action bindings refer to action methods in the controller.
Component bindings refer to other Visualforce components

Visualforce Interview Questions And Answers
Question # 30. What is the main difference between using dataTable vs. pageBlockTable tags?

Answer # PageBlock: For default salesforce standard format.
dataTable:To design customformats

Visualforce Developer Interview Questions And Answers

Question # 31. Which tag is used with both radio buttons and picklists to create the selectable values?

Answer # <Apex:selectoption> tag

Question # 32. How many controllers can a page have? Where is the controller for a page assigned?

Answer # One main controller (of course, it could have extensions or custom components could have controllers, etc.). The controller is assigned in the <apex:page> tag.

Visualforce Interview Questions And Answers
Question # 33. There are a series of layout components that all help recreate the traditional Salesforce page layout style very easily. What name do they share?

Answer # pageBlock.

Question # 34. Which tags should be used to automatically bring in the Salesforce label and default widget for a field?

Answer # pageblock

Question # 35. What are static resources?

Answer # Static resources are a new type of storage in Salesforce specifically designed for use in Visualforce pages. They are ways to store images, flash files, stylesheets, and other web resources on the Salesforce servers that can be cached for better page performance.

Visualforce Interview Questions And Answers
Question # 36. What are some examples of JavaScript Events?

Answer # Onmouseover, onclieck etc.

Question # 37. What is AJAX typically used for in Visualforce

Answer # AJAX is primarily used for partial page updates in Visualforce. In s-controls, the AJAX toolkit was the soap (XML over HTTP) client that gave you access to the force.com Web Services API.

Question # 38. What is the purpose of <script> tags?

Answer # Script tags allow you to create JavaScript (or other types) functions that can be used within your pages

Question # 39. What are the different AJAX action tags? What does each do?

Answer #

actionStatus: used to display start and stop statuses of AJAX requests.
actionSupport: used to call a second component when an event happens to the first component.

actionPoller: similar to actionSupport, but the event is based on a timer instead of a user action.

actionFunction: provides support for invoking a controller action from JavaScript code using an AJAX request by defining a new JavaScript function.
actionRegion: used to demarcate which parts of the page the server should reprocess.

Visualforce Interview Questions And Answers
Question # 40. How can you create partial page refreshes?

Answer # Basically, you need to define the section of the page that is going to refresh (typically with a panel of sorts), and then define the event that will cause the refresh. The method changes depending on if the area being refreshed is the same as the one handling the event. It also depends on if you are just processing something on the server, or if you need the UI to change.

Visualforce Technical Interview Questions And Answers

Question # 41. Which tag is used with both radio buttons and picklists to create the selectable values?

Answer # <apex:selectOption>

Question # 42. What is the purpose of creating attributes on components?

Answer # By allowing the component to take parameters via an attribute, you can make the component more flexible and reusable

Question # 43.What are the Global Key words?

Answer # We have global keywords like component,User,url,current page etc., to access various values from components on page, from user object or from url or from current page fields. To access value from each source, we have different global keywords. One such keyword is explained in above question(!$component)

Various global keywords are:
i. URL
ii. USER
iii. PROFILE
iv. Resource
v. Component
vi. Current page
vii. Page reference etc.

Visualforce Interview Questions And Answers
Question # 44.How can you access visualforce components values into a JavaScript?

Answer # Using Component global variable, we can access visualforce components in javascript. Let us suppose, we want to use id of an apex field with id=”afield”.

So, we can use the {!$Component.afield} syntax to use properties of the field in javascript.
Let us suppose, we want to store the field’s value in java script, then we can use like below:

<script>
Var a =’ document.getElementById(‘{!$component.afield}’).value’;
</script>

Question # 45.What are the Gov Limits in Salesforce.com?

Answer # Because Apex runs in a multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that runaway scripts do not monopolize shared resources.

These limits, or governors, track and enforce the statistics outlined in the following table. If a script ever exceeds a limit, the associated governor issues a runtime exception that cannot be handled.

Sources: Salesforce Tutorial  |  Salesforce Blogspot

RELATED INTERVIEW QUESTIONS

  1. Salesforce Interview Questions
  2. 300 SSIS Interview Questions
  3. PHP Interview Questions And Answers
  4. Alteryx Interview Questions
  5. AWS Cloud Support Interview Questions
  6. Google Kubernetes Engine Interview Questions
  7. AWS Devops Interview Questions
  8. Apigee Interview Questions
  9. Actimize Interview Questions
  10. Kibana Interview Questions
  11. Nagios Interview Questions
  12. Jenkins Interview Questions
  13. Chef Interview Questions
  14. Puppet Interview Questions
  15. DB2 Interview Questions
  16. AnthillPro Interview Questions
  17. Angular 2 Interview Questions
  18. Hibernate Interview Questions
  19. ASP.NET Interview Questions
  20. Kubernetes Interview Questions
  21. Docker Interview Questions
  22. CEH Interview Questions
  23. CyberArk Interview Questions
  24. Appian Interview Questions
  25. Drools Interview Questions
  26. Talend Interview Questions
  27. Selenium Interview Questions
  28. Ab Initio Interview Questions
  29. AB Testing Interview Questions
  30. Mobile Application Testing Interview Questions