Salesforce Interview Questions - Part 3

Salesforce Interview Questions - Part 3



1. What are expressions used in pages to bind in controllers?
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.

2. What is the purpose of controllers?
Controllers provide the data and actions that are available to a Visualforce page.

3. Which objects have associated standard controllers?
All standard and custom objects that can be accessed via the API have associated controllers

4. What is included with each standard controller?
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.

5. When do you need to go beyond a standard controller and code custom Apex?
If you need data beyond the limits of what is available in the standard controller or actions that go beyond the provided standard actions.

6. Compare and contrast custom controllers and controller extensions.  How are they the same?  How are they different?
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.

7. What identifies a controller as being an extension?
The controller must declare a constructor which takes another controller explicitly.  For example: public myControllerExtension(ApexPages.StandardControllerstdController) {
this.acct = (Account)stdController.getRecord();  }

8. Why are properties helpful in controllers?
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.

9. In what order do methods fire within a controller?
The only rule is that setters fire before action methods.  Aside from that, there is no guaranteed order.

10. What are some Apex classes that are commonly used within controllers?
StandardController, SelectOption, PageReference, Message, etc.
11. How are wizard controllers different from other controllers?
The two main issues is that they must handle multiple pages and they must maintain the state across those pages.

12. What are the effects of using the transient key word?
The transient key word prevents the data from being saved into the view state.  This should be used for very temporary variables.

13. When is a component controller required for custom components?
A component controller is required when business logic is required to decide how to render the component.

14.What kind of content can be included in a Visualforce page?
Any content that can be rendered in a browser (HTML, JavaScript, etc.).

15. What do {!expressions} refer to when used in Visualforce components?
Expressions refer to either data or actions that are made available to the page from the controller

16. What are the ways that Visualpages can be incorporated into the rest of your user interface?
Basically, via links, buttons, tabs, and inline frames.

17. Is it always necessary to know Apex to create Visualforce pages?  When does it become necessary?
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.

18.What are attributes?  What is the syntax for including them?
Attributes are modifiers to the main tag that belong after the tag name in the start tag.  The syntax is attributeName=“attributeValue”

19. What are three types of bindings used in Visualforce?  What does each refer to?
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

20. Which tag is used with both radio buttons and picklists to create the selectable values?
<Apex:selectoption> tag

21. How many controllers can a page have?  Where is the controller for a page assigned?
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.

22. There are a series of layout components that all help recreate the traditional Salesforce page layout style very easily.  What name do they share?
pageBlock.

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

24. What are static resources?
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.

25.What are some examples of JavaScript Events?
Onmouseover, onclick etc.


26. What is AJAX typically used for in Visualforce
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.

27.   What is the purpose of <script> tags?
Script tags allow you to create JavaScript (or other types) functions that can be used within your pages

28.   What are the different AJAX action tags?  What does each do?
         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.
          
29. How can you create partial page refreshes?
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.

30.What is the purpose of creating attributes on components?
By allowing the component to take parameters via an attribute, you can make the component more flexible and reusable

31.What are the Global Key words?
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.

32.How can you access visualforce components values into a JavaScript?
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>

33. How many custom objects available in Professional and Enterprise edition and Unlimited?
Professional    50, Enterprises    200, Unlimited    2000

34.In Which edition the Apex Data Loader will support? What are those editions? 
Earlier Enterprise and Unlimited editions use to support Apex data loader. Now, Professional, Enterprise and Unlimited edition supports data loader.
40 Through Sales force Import wizard how many records we can import into S.F Objects and the wizard will support for which Objects?
Using Import wizard, we can upload up to 50000 records. And only Accounts, Contacts and custom object’s data can be imported.  If we want to import other objects like Opportunities and other object’s data, then we need to go for Apex Data Loader.

35. In Which Edition Outlook and Excel and Mobile Lite are available in S.F?
Mobile Lite users can view, create, edit, and delete accounts, assets, contacts, leads, opportunities, events, tasks, cases, and solutions from mobile.
Mobile lite is available in all editions i.e.; Group edition, Professional edition, Enterprise edition, Unlimited edition.
Outlook  connect to sales force is used to sync contacts, Events and mails to sales force. Like mobile lite feature this is also available in all above mentioned editions.

35.What is app exchange?
The developed custom applications can be uploaded into the app exchange so that the other person can share the applicaition.

36.What is a VLOOKUP in S.F?
VLOOKUP is actually a function in sales force which is used to bring relevant value to that record from another record automatically.
46 What are the types of bindings available in Visual force?
Using get; set in apex, we can bind variables in visual force.
ex:     public String textdemo{get;set;} // in apex
<apex:input text value=”{!textdemo}”>
Using methods in controller
Ex: <apex:selectlist value=”textdemo”>
<apex:selectoptions value=”listt”/>
</apex:selectoptions>
//In apex
Public List<Account>getlistt(){
Return [select Id,Name from Account]; \\ returns list
}

37. What is junction Object and what does it mean?
Junction object is a custom object which is used to create many to many relationship between two objects.
It always contains two Master-Detail relationships.

38.When I want to export data into SF from Apex Data Loader, which Option should be enable in Profile?
Enable API

39.What is an Assignments rule?
It is a Rule to specify how leads are assigned to users or queues as they are created manually, captured from the web, or imported via the lead import wizards.

40.What is a web- lead?
Capturing a lead from a website and routing it into lead object in Sales Force is called wed-lead (web to lead).

41.What is an External Id?
External Id is an id that can be given to any field in an object. An external id will be generated on the field that we mention. This field will be used to detect duplicate values when we try to import data into sales force using an external system like apex data loader, informatica data loader etc.

42.What are the Types of Account and difference between them?
We have two types of accounts.
Personal accounts
Business accounts.
In personal accounts, person’s name will be taken as primary considerations where as in business accounts, there will be no person name, but company name will be taken into consideration.

43.What is a Field level Security?
Giving permissions to users based on Profiles.
Mentioning the availibity of a field to the users for viewing and editing purpose based on profile is called field level security.
While creating a field,we can mention the security level of that field fr every profile by deciding its level of accessibility to each profile.

44. What is a workflow? Types of workflow and actions in workflow.
Workflow is a force platform business logic engine that allows us to automatically send email alerts, assign tasks, field updates based on rules that we define.
2 types:
Immediate actions:  That e xecutes when a record matches the criteria.
Time-dependent:  When a record matches the criteria, and executes according to time triggers.
Actions:
Task :Asign a new task to user.
Email-alerts : Send email to one or more recipients that are specified.
Field Updates : Update value of a field.
Outbound Messages: Send a configurable API message to designed listener.

45.What is a Page Reference?
Page reference is a class in apex, which is used to redirect to another page.
By creating an object to this class, we can use this object to forward to another page as shown in example below:
Public Pagereferencego()
{
Pagereference p = new pageReference(‘http://www.google.com’);
Return p; }

46.What are the Controllers available in Force.com?
3 types of controllers are available
Standard Controller: Used for both custom and standard objects.
Custom Controller: is an apex class that implements all the logic for a page without leveraging the functionality of a standard controller.
Extension Controller: is an apex class which adds functionality to existing standard and custom controllers.

47.How can you access URL Parameters in to a visual force page?
Using $CurrentPage, you can access the query string parameters for the page by specifying the parameters attribute, after which you can access each individual parameter.
$CurrentPage.parameters.parameter_name
Ex: $CurrentPage.parameters.location

48.What is a Force.com IDE?
Ans. Force.com IDE is a development environment which is available as a plug-in to be installed in Eclipse and used. This IDE can be used to work on and manipulate the salesforce structure like authoring Apex classes, Visual force pages, apex triggers etc.,

49.What is a difference between System log and debug log?
System Log console is a separate window that displays debugging information, as well as its cumulative limits and source code. It can be considered a context-sensitive execution viewer showing the source of an operation, what triggered that operation, and what occurred afterward. Use the System Log console to view debug logs that include database events, Apex processing, workflow, and validation logic.
Debug log records database operations, system processes, and errors that occur when executing a transaction or while running unit tests. The system generates a debug log for a user every time that user executes a transaction that is included in the filter criteria.

50.What is MVC?
The main aim of the MVC architecture is to separate the business logic and application data from the presentation data to the user.
Model: The model object knows about all the data that need to be displayed.
View: The view represents the presentation of the application (User Interface).
Controller: Actual business logic of VF is present here.

51.What are annotations ant their types?
Annotations are used to bypass the methods in the way they execute.
@Future: Used to execute the methods asynchronously.
@IsTest: Used to test the methods.
@ReadOnly
@Deprecated
@Remote Action

52. What is Batch Apex? How can you implement Batch Apex? (Dynamic Apex)
Batch Apex gives you the ability to operate over large amounts of data by chunking the job into smaller parts, thereby keeping within the governor limits.
Using batch Apex, you can build complex, long-running processes on the Force.com platform. For example, you could build an archiving solution that runs on a nightly basis, looking for records past a certain date and adding them to an archive.

53.What is a Callout method? How does it invoke, how many methods available in Classes and Triggers?
It is used to invoke the External services HTTP or web services.
An Apex callout enables you to integrate your Apex with an external service by making a call to an external Web service or sending a HTTP request from an Apex script and then receiving the response. Apex provides integration with Web services that utilize SOAP and WSDL, or HTTP services (RESTful services).

76 What are triggers? Types of Triggers?
Trigger is a piece of code that is executed before or after a particular field of certain type is inserted, updated or deleted.
Bulk Trigger:  All triggers are bulk triggers by default, and can process multiple records at a time. You should always plan on processing more than one record at a time.
Bulk triggers can handle both single record updates and bulk operations like:
Data import
Mass actions, such as record owner changes and deletes
Recursive Apex methods and triggers that invoke bulk DML statements.
Recursive trigger:
A recursive trigger is one that performs an action, such as an update or insert, which invokes itself owing to, say something like an update it performs.
 e.g. in a before trigger, if you select some records and update them, the trigger will invoke itself.
 To avoid, static variable 'locks' are used. 

We need your support,Please share/Like us on Facebook ⛅
Salesforce Interview Questions - Part 3 Salesforce Interview Questions - Part 3 Reviewed by dasfrogpractice on 22:32 Rating: 5

1 comment:

  1. An exhaustive list of questions which really helps.
    You can also visit https://maytheforcebewithall.blogspot.com in case you are looking for Q&A series on Salesforce key topics

    ReplyDelete

Theme images by mariusFM77. Powered by Blogger.
Youtube Channel Image
Dasfrog Subscribe To watch more Salesforce Training
Subscribe