0% found this document useful (0 votes)
44 views13 pages

SFDC Interview Questions - Differences

Uploaded by

jateenp2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views13 pages

SFDC Interview Questions - Differences

Uploaded by

jateenp2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

1. Difference Between SOQL and SOSL?

SOQL SOSL
soql stands for salesforce query sosl stands for salesforce search language
language
Need to write different soql against works on multiple objects at same time
diff objects
Soql against same field will be slow All fields are alredy text indexed
can be used in apex classes and Cannot be used in triggers, can be
triggers. used in apex classes anonymous block.

2. Difference between Workflow and Approval Process?


Workflow Approval Process
They are activated when a record is Approval process is triggered by explicitly clicking the
saved. "Submit for Approval" button.
Workflow consists of single step and Approval process consists of multiple steps. Also
single action Approval process different action is taken based upon whether the record is
consists of multiple steps. Also approved or rejected.
different action is taken based upon
whether the record is approved or
rejected.
Workflow consists of single step and In approvals some attributes cannot be modified.
single action Processes must be deactivated before approvals delete.

3.Difference between created, and every time it’s edited and created, and any time it’s
edited to subsequently meet criteria in Salesforce
created, and every time it’s edited created, and any time it’s edited to subsequently
meet criteria in Salesforce
Fired whenever the record is created or Fired whenever the record is created or edited and
edited and match the criteria. previously did not meet the criteria and now
matches the criteria.
Time dependent workflow actions cannot Time dependent work flow actions can be created.
be created.

4.What is the difference between Customizable Forecasts and Collaborative Forecasts?


Customizable Forecasts Collaborative Forecasts
The forecast categories can reflect aggregate The forecast categories only display
information. information for that specific category.
Territory Management is supported. Territory Management is not supported.
5.Difference between managed and unmanaged package in Salesforce
Unmanaged Package Managed Package

Unmanaged packages are typically used to


Managed packages are typically used
distribute open-source projects or application
bysalesforce.com partners to distribute and sell
templates to provide developers with the basic
applications to customers.
building blocks for an application.

Once the components are installed from an Once the components are installed from a
unmanaged package, the components can be managed package, the components cannot be
edited in the organization they are installed in. edited in the organization they are installed in.

6.Difference between standardcontroller, controller and extensions in Salesforce?


Standard Controller:

 Standard Controller is available for all API entities/objects as well as Custom objects.
 Provides access to standard salesforce data and behavior.
 Syntax:<apex:page standardcontroller="Account">
Custom Controller:
 Custom Controller is an apex class that implements all the logic for a page without
leveraging the functionality of a standard controller.
 Are coded to create custom behavior.
 Syntax:<apex:page controller="c13">
 If you want to use one or more standard objects in apex class, there is only way to use
custom controller.
 If you use standard controller or extension controller, by default sharing rule is applicable
,so at that time only way is custom controller.
Extension Controller:
 Any apex class having a public constructor with custom controller or standard controller
object as a single argument is known as controller extension.
 It is an apex class which adds functionality to existing standard and custom controllers.
 A visualforce Page can have multiple controller extensions, but only one standard or
custom controller.
 syntax:<apex: page standardcontroller="account" extension="hani143">
7.Difference Between Trigger.New and Trigger.newMap in Apex?
Trigger.New Trigger.newMap
Returns a list of the new versions of the Returns a map of IDs to the new versions of the
sObject records sObject records.
Note that this sObject list is only available Note that this map is only available in before
in insert and update triggers, and the update, after insert, and after update triggers.
records can only be modified in before
triggers.
Trigger.newMap dont work for before insert Trigger.New works fine for holding all Ids of
while records while inserting.
Trigger.new returns a list, which are ordered Trigger.newMap returns a map - which are
unordered.

8.Difference between auto-response rules and work flow rules?


auto-response rules work flow rules

it is designed for Notifications to interested for initial response to a particular case


parties created persion
it runs when record is created or edited it runs only when record created

it send many mails when ever criteria matches Sends one email based on the first rule entry
criteria it matches in a sequence of rule
entries.

9.Difference between Interface and Abstract Class?


Interface Abstract Class
Declare with keyword Interface Declare with keyword Abstract
It will not contain constructor It may or may not contain constructor
By default all methods are public abstract It contains abstract methods and non abstract
methods. methods.
It contains only final variables It contains final variables and instance variables
We can implement multiple interfaces We can inherit only one abstract class

10.What is difference between Salesforce Enterprise and Partner WSDL?


Salesforce provides SOAP services provide two different WSDL specs name Enterprise and
Partner to access the data remotely.
Enterprise WSDL Partner WSDL
Is strongly typed, the object and its attributes Is loosely typed, the object and its attributes can
are fixed. be variable.
Contains the metadata about all standard and Does not contain metadata about objects and
custom fields and objects. fields.
Can only be used against your Salesforce Can be used against many Salesforce.com
instance. organizations.
Takes an array of key-value pairs.

11.Difference between Roles and Profiles


Roles Profiles
Role hierarchy does not do any of these Profile manages the Salesforce.com License,
things Tabs Settings, Record types, Page layouts,
General Settings, Administrator Settings etc
Optional for User creation. Mandatory for User creation.
Maintain Record level access. Maintain object level access.
Role is not Mandatory Profile is Mandatory

Role helps in opening the records to the Profile helps to put restrictions on the
users above the Role hierarchy Object

12.Difference between Lookup and Master-Detail relationship in Salesforce?


Lookup Master-Detail
Loosely coupled. Tightly coupled.
Parent is not a required field while creating Parent is a required field while creating child
child record. record.
We cannot create roll-up summary field. We can create roll-up summary field.

No cascade delete. Cascade delete.


1. We can have maximum 2 master details on an1. We can have maximum 25 lookup on an
object object.

13. Difference between Lookup Filters and Validation Rules in Salesforce?


Validation rules and lookup filters both are very similar, but offer different advantages.
Use a lookup filter:
You want to improve user efficiency by limiting the number of available options in a lookup
search dialog.
You want to improve user efficiency by automating filters on lookup search dialogs that your
users manually set.

Use a validation rule:


You’re close to the maximum number of lookup filters allowed.
You must implement a complex business rule that requires you to use a formula. Formulas can
reference fields that basic filter criteria can’t reference, such as fields on the parent of the source
object. Formulas can also use functions. For example, use ISNEW if the rule should only apply on
record creation, or ISCHANGED if the rule should apply when a field changes.

14. What is difference between trigger and workflow?


Workflow
Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
We can access a workflow across the object.
We cannot perform DML operation on workflow
We cannot query from database
Trigger
Trigger is a piece of code that executes before or after a record is inserted or updated.
We can access the trigger across the object and related to that objects
We can use 20 DML operations in one trigger.
We can use 20 SOQL’s from data base in one trigger.
15. What is difference in ISNULL and ISBLANK?
ISNULL:
•Determines if an expression is null (blank) and returns TRUE if it is. If it contains a value, this
function returns FALSE.
•Text fields are never null, so using this function with a text field always returns false. For
example, the formula field IF(ISNULL(new__c) 1, 0) is always zero regardless of the value in the
New field. For text fields, use the ISBLANK function instead.
•Multi-select picklist fields are never null in s-controls, buttons, and email templates, so using this
function with a multi-select picklist field in those contexts always returns false.
•Empty date and date/time fields always return true when referenced in ISNULL functions.
•Choose Treat blank fields as blanks for your formula when referencing a number, percent, or
currency field in an ISNULL function. Choosing Treat blank fields as zeroes gives blank fields
the value of zero so none of them will be null.
•Merge fields can be handled as blanks, which can affect the results of components like s-controls
because they can call this function.
•When using a validation rule to ensure that a number field contains a specific value, use the
ISNULL function to include fields that do not contain any value. For example, to validate that a
custom field contains a value of ’1,’ use the following validation rule to display an error if the
field is blank or any other number: OR(ISNULL(field__c), field__c<>1)

ISBLANK:
•Determines if an expression has a value and returns TRUE if it does not. If it contains a value,
this function returns FALSE.
•Use ISBLANK instead of ISNULL in new formulas. ISBLANK has the same functionality as
ISNULL, but also supports text fields. Salesforce.com will continue to support ISNULL, so you
do not need to change any existing formulas.
•A field is not empty if it contains a character, blank space, or zero. For example, a field that
contains a space inserted with the spacebar is not empty.
•Use the BLANKVALUE function to return a specified string if the field does not have a value;
use the ISBLANK function if you only want to check if the field has a value.
•If you use this function with a numeric field, the function only returns TRUE if the field has no
value and is not configured to treat blank fields as zeroes.

16. Difference between rendered, renderAs and reRender in Visualforce page


render - Boolean value (if it is true, it displays the block else it will be hidden)
reRender - ID. Particular block will be refreshed.
renderAs - Display the page as pdf, excel, etc...

17. Differences between the Import Wizard and the Apex Data Loader
Salesforce CRM provides two tools for data migration—the Import Wizard and the Apex Data
Loader.
The Import Wizard
is designed for less-technical users and smaller, simple imports of up to 50,000 records. It takes
you through the process step by step and displays error messages to alert you to potential record
duplications ("dupes"). For more information, go to Help & Training | Importing Data | Using the
Import Wizards.
Use the Apex Data Loader
for complex imports of any size. It's for technical users only. You'll need access to the API to use
this tool, which is included with Enterprise and Unlimited Edition. If you have another edition,
you can purchase the API separately by contacting your account executive. The Data Loader
doesn't display error messages to alert you to potential problems. However, this tool includes
several features that help make large data imports easier, such as being able to save your
mappings. For more information, go to Help & Training | Data Loader.
The table below summarizes the difference between the two tools. The instructions in the
remaining steps refer to the Import Wizard.

18. Difference In Between Apex PageMessage, PageMessages and Message VF Pages Tags in
Salesforce?
Most of the times on submission of page errors will be there and for showing those error
messages different message tags are there in Visualforce Page Reference guide and first time they
all are gave a feel that they all are same but some minor differences are there among them and
those differences are as given below:-
Apex:PageMessages
apex:PageMessages is a containing component where any messages that have been added to the
page will appear.
Apex:PageMessage
apex:pageMessage is a component that adds a single message to the page.
Apex:Message
apex:message allows you to associate a message with a component.
Notes
ApexPages.Message is the class that is used to model a message. A message isn't associated with
a page until it is added via the ApexPages class.
ApexPages is a class that allows you to access the current page (through
pexPages.CurrentPage()) and manage messages for the current page.
As Shown below messages can be of Error type and Custom Type and generally
Apex:PageMessages tag comes in use for showing all the messages.

19. What is difference between WhoId and WhatId in the Data Model of Task ?
WhoID refers to people things. So that would be typically a Lead ID or a Contact ID
WhatID refers to object type things. That would typically be an Account ID or an Opportunity ID
21. Difference between Profile, OWD or a Sharing Rule?
Profile: Profile is used for object level access. It is used to provide CRUD(Create, Read, Update
and Delete) permission.
OWD: OWD is used for record level access for all the users across Organization. It is used to
provide Public Read Only, Public Read/Write, Private, Public Read/Write/Transfer (Lead and
Case Objects alone).
Sharing Rule: Sharing Rules is used to extend Role Hierarchy.

20. Difference between trigger.new and trigger.old in Salesforce?


Trigger.new : Returns a list of the new versions of the sObject records. Note that this sObject list
is only available in insert and update triggers, and the records can only be modified in before
triggers.
Trigger.old : Returns a list of the old versions of the sObject records. Note that this sObject list is
only available in update and delete triggers.

21. difference of ActionFunction and ActionSupport and ActionPoller?


Actionfunction used to call the server side method using javascript
Actionsupport used to call the server based on the client side event i.e. like onclick
,onchange..etc
ActionPoller is a timer that sends an AJAX update request to the server according to a time
interval that you specify.

22. Diff between Profile and permission sets?


Profile:
1. Profile is a collection of permissions and settings associated with user or group of users.
2. User can have only one profile.
3. profile is mandatory while creating user.
Permission Sets:
1. Permission sets is a collection of settings and permissions that give users access to various tools
and functions.
2. The settings and permissions in permissions sets are also found in profiles,but permission sets
extend users functional access without changing their profiles.
3. Users can have only one profile, but can have multiple permissions sets.

23. What is the difference between database.insert and insert ?


insert is the DML statement which is same as databse.insert. However, database.insert gives
more flexibility like rollback, default assignment rules etc. we can achieve the database.insert
behavior in insert by using the method setOptions(Database.DMLOptions)

Important Difference:
· If we use the DML statement (insert), then in bulk operation if error occurs, the execution will
stop and Apex code throws an error which can be handled in try catch block.
· If DML database methods (Database.insert) used, then if error occurs the remaining records
will be inserted / updated means partial DML operation will be done.

24. Difference in “Export” and “Export All” in Data Loader in Salesforce?


Export: It is used to export the Salesforce Data(excluding recycle bin’s data) into your local
system.
Export All: It is used to export the Salesforce Data(including recycle bin’s data) into your local
system.

25. What is the difference between the global and public access modifier keywords?
We have different access modifiers like global, private, public.If we use the access modifier as
Global, it can be used anywhere in the org. Generally, Global is used for web-services since one
class needs to handle some other parts of apex in the org.Whenever we use Public keyword, then
the access is limited to the particular class and cannot be used outside the related class.

26. What is difference between Static Resources V/S Documents?


Static Resources v/s Documents:
1. Static resources are data cached and you can refer them easily in VF (including zip files) which
store on Sales force server.
2. Static Resources and Documents are having an absolute limit of 5MB for each document.
3. You can package a collection of related files into a directory hierarchy and upload that hierarchy
as a .zip or .jar archive), images, style sheets, JavaScript, and other files.
4. You can reference a static resource by name in page markup by using the $Resource global
variable instead of hard-coding document IDs.
5. JavaScript or CSS is preferable to including the markup inline. Managing this kind of content
using static resources allows you to have a consistent look and feel for all your pages and shared
set of JavaScript functionality.
Referencing a Static Resource in Visualforce Page:

<apex:image url="{!$Resource.TestImage}" width="50" height="50" />


or
<apex:includeScript value="{!$Resource.MyJavascriptFile}"/>

27. Difference between SOAP and Restful Webservice


* REST and SOAP are the two web service frameworks available on the Force.com platform.
* The SOAP API uses authentication with username and password, and communicates using
XML messages. There are different API's to work with the Enterprise, Partner, Bulk, Metadata
etc.
*The REST API uses HTTP to authenticate, it uses a token authentication and can use OATH to
authenticate, it communicates using JSON messages.
*REST API is generally lighter weight than the SOAP API, works well with mobile applications
especially.

28.Difference b/w look-up filter and look up?


look-up filter
Lookup filters are administrator settings that restrict the valid values and lookup dialog results for
lookup, master-detail, and hierarchical relationship fields. Administrators specify the restrictions
by configuring filter criteria that compare fields and values on:
 The current record (source)
 The lookup object (target)
 The user's record, permissions, and role
 Records directly related to the target object.
Look up
This is the type of relationship links two objects together, but has no effect on deletion or
security. Unlike master-detail fields, lookup fields are not automatically required. When you
define a lookup relationship, data from one object can appear as a custom related list on page
layouts for the other object. See the Salesforce online help for details.

29. What is difference between Remote Access and Actionfuctions?


@RemoteAction and apex:actionFunction are essentially polar opposites in terms of functionality,
even though they both offer JavaScript functionality.

@RemoteAction apex:actionFunction
@RemoteAction methods are static, and apex:actionFunction methods are instance methods,
therefore can't see the current page state and so can see the entire page state.
directly

@RemoteAction methods require less apex:actionFunction has to transfer the page view
bandwidth, and server processing time, state.
because only the data you submit is visible
and the view state is not transferred,
@RemoteAction methods have to update the apex:actionFunction methods automatically update
DOM manually using explicit JavaScript the Visualforce DOM and can refresh part or all of
the page, and can provide a standard interface for
showing a loading status through apex:actionStatus.
@RemoteAction methods can return data apex:actionFunction methods can update the page's
directly back to the calling JavaScript, but view state and DOM structure, but cannot return
cannot update the page's view state data directly back to JavaScript (although you can
do this with some extra effort using oncomplete).

30. What is difference between pageblocktable, Datatable and Repeater?


PageBlockTable:
1.PageBlockTable should be define inside pageblock or pageblocksection.
2.PageBlockTable uses standard styles sheets to design a visualpage.
3.It has the required attribute "value".
4.Column headers will be displayed automatically.

DataTable:
1.No need to write inside pageblock or pageblocksection.
2.There is no required value.
3.The data can be displayed using custom style sheets.
4.We need to specify column headers explicitly.
5.
Repeater:
1.There is no proper alignment of data in repeater compared with DataTable.
31. what is the difference between input field and input text?
Input field:
An HTML input element for a value that corresponds to a field on a Salesforce object. The <
apex:inputField > component respects the attributes of the associated field, including whether the
field is required or unique, and the user interface widget to display to get input from the user. For
example, if the specified < apex:inputField > component is a date field, a calendar input widget is
displayed. When used in an < apex:pageBlockSection >, < apex:inputField > tags always display
with their corresponding output label. - from component reference
In simple language - It's the field on the object and you can have any data type, which
users can input . Example Picklist, look up, check box and / or multi select picklist etc......
Input text:
An HTML input element of type text. Use this component to get user input for a controller
method that does not correspond to a field on a Salesforce object.
This component does not use Salesforce styling. Also, since it does not correspond to a field, or
any other data on an object, custom code is required to use the value the user inputs. - from
component reference.
This is a field on the object which is of data type Text . Users can use to input only text
using this field.
You cannot use this for picklists , check boxes or any other data type.

32.Difference between InputField and OutPutField Components?


InputField:
An HTML input element for a value that corresponds to a field on a salesforce object.
It respect attributes of the associated field.like whether the filed is unique or mandatory,if it is
pick list ,display automatically picklist input widget is displayed.
If we use InputField under PageBlockSection,it always display with their corresponding output
label.
OutPutField:
A read only display of a label and value for a field on salesforce object.
It also respect attributes of the associated field like if it is currency field,the appropriate currency
symbol is displayed.
OutPutfield must be child of PageBlock or PageBlockSectionItem.
(Or)
InputText:
An HTML Input element of type text.
Use this component get the user input for a contoller method that does not correspond to a field
on a salesforce object.
InputText Doesnot use salesforce styles.
OutPutText:
Displays text on a visualforce page.
Customize the appearance of the component using the css styles.
This component doesn't respect the View Encrypted Data Permission. So Instead use OutPutField
component to prevent showing sensitive information to the unauthorized users.

33. What is the difference between SingleEmailMessage and MassEmailMessage?


SingleEmailMessage:
The SingleEmailMessage can send message related to only single record.
setTargetObjectId - The ID of the contact, lead, or user to which the email will be sent.
Used for single record.
SYN: Messaging.SingleEmailMessage
MassEmailMessage:
MassEmailMessage can send mails related to multiple records (WhatId and TargetObjectId).
setTargetObjectIds - A list of IDs of the contacts, leads, or users to which the email will be sent.
Used for multiple records SYN: Messaging.MassMailMessage

34. Difference between Page Layouts and Field-Level Security?


Page Layouts:
Controls display of details and edit page.
Controls page section customization.
Allows you to set field properties.
Can be unique for Specific Business.
Field-Level Security:
Defines users access to view and edit fields in salesforce.
Helps data security.
Helps users to view relevant data.
Hides field from user, list view, search, reports.

35. Difference between List, Set and map?


List:
Ordered Collection of Primitive datatypes,sobjects,enums,etc.
It allow duplicate values.
It Follows Insertion Order.
Set:
Unordered Collection of Elements.
Its Doesn't Allow duplicate values.
It Doesn't follow Insertion Order.
When We try to add duplicate Element,element is not added and Add() method returns false.
Map:
Map is a key-value pairs.keys represents Unique and primitive,value can be
primitive,sobjects,colletion,apexobjects.
It Will not follow insertion order.
When we try to give duplicate key,put() return existing key value and replace existing key value
with new value.

36. Difference between Apex :Output Label and Apex:outputLink?


Apex :Output Label
The outputLabel tag renders an HTML "label" element. It allows you to customize the appearance
of the label using CSS styles. The outputLabel component is associated with another component
via its "for" attribute. The other component must be created before the outputLabel component
when the JSF page is rendered.
Note the use of the panelGroup container in the example below. The panelGroup component
renders its children, allowing the outputLabel component to locate the inputText component at
render time.
Example
<apex::panelGroup>
<apex::outputLabel id="usernameLabel" for="username" value="#{bundle.usernameLabel}" />
<apex::inputText id="username" value="#{userBean.user.username}}" />
</apex:panelGroup>
HTML Output
<label id="form:usernameLabel" for="form:username">Username</label>
<input id="form:username" name="form:username" type="text" value=""/>

Apex:outputLink
A link to a URL. apex:outputLink component is rendered in HTML as an anchor tag with an href
attribute. Like its HTML equivalent, the body of an <apex:outputLink> is the text or image that
displays as the link. To add query string parameters to a link, use nested <apex:param>
components.
See also: <apex:commandLink>
Example
<apex:outputLink value="https://www.salesforce.com"
id="theLink">www.salesforce.com</apex:outputLink>
HTML Output:
<a id="theLink" name="theLink" href="https://www.salesforce.com">www.salesforce.com</a>

37. Difference between Force.com IDE and Sandbox?


The Force.com IDE is a powerful client application for creating, modifying, testing and deploying
Force.com applications. Based on the Eclipse platform, it provides a comfortable environment for
programmers familiar with integrated development environments, allowing you to code, compile,
test, and deploy all from within the IDE itself.

Sandbox Developer Edition

The salesforce.com Sandbox Developer Edition was an edition created for


environment is an exact copy of your development of integrations and apps,
salesforce.com instance. specifically for the AppExchange.

You can copy your live instance to a You have to perform manually from sandbox to
sandbox environment. developer edition.

You can either copy your


You cannot copy your configuration or data onto
configuration and data into a sandbox
the Developer Edition, but you can customize it to
environment or just the
match your instance’s look and feel.
configuration.
38.Difference between Jump Start Wizard and Standard Wizard?
– The Jump Start wizard creates a one-step approval process for you in just a few minutes
– The Standard Wizard is useful for complex approval processes.

Jump Start Wizard


• The jump start wizard is useful for simple approval processes with a single step.
• Use the jump start wizard if you want to create an approval process quickly by allowing
Salesforce to automatically choose some default options for you.

Standard Wizard
• The standard wizard is useful for complex approval processes.
• Use it when you want to fine tune the steps in your approval process.
• The standard wizard consists of a setup wizard that allows you to define your process and
another setup wizard that allows you to define each step in the process.

39.What is the difference between Database.QueryLocator and Iterable in Batch Apex in


Salesforce.?
Database.QueryLocator:
50 Million records can be returned.

Iterable<sObject>:
Governor limits will be enforced. So, we can use upto 50,000 records only. Else, exception will
be thrown.
You can also use the iterable to create your own custom process for iterating through the list.

40. What is the difference between Validation rule and roll-up summary fields?
http://infallibletechie.blogspot.com/2012/09/roll-up-summary-field.html

You might also like