Interview QA
Interview QA
Let’s start with Salesforce Admin Interview questions with platform questions first.
Simply put, cloud computing is a way of accessing services on the internet instead of
on your computer. You can use the cloud to access applications, data, and
development tools from virtually anywhere. Whether you’re working on your phone
from a crowded train in Chicago or on your laptop at a hotel in Hong Kong, you can
access the same information because it all lives online.
Let’s start with Salesforce Admin data modeling interview questions. That is
fundamental for any admin.
Objects in Salesforce are used as database tables that are used to store information
about an organization. We have two types of objects in salesforce, they are.
1. Standard Object: These are the objects provided by the salesforce, which
include contacts, accounts, opportunities, leads, cases, campaigns, products,
contracts, dashboards, etc.
2. Custom Object: This includes the modifications made to the Salesforce by
users. It stores the essential and unique information of an organization.
Custom Object includes page layouts, relationship to other objects, custom
user interface tab, custom fields, etc.
A roll-up summary field calculates values from related records, such as those in
a related list. You can create a roll-up summary field to display a value in a master
record based on the values of fields in a detail record. The detail record must be
related to the master through a master-detail relationship.
If the default Max Roll-Up Summary Field limit per object increased from 10 to 25
in the Winter ’16 release. Hard-coded limit for roll-up summary fields is 40 per object
Checkbox Yes No
Role Profile
The role helps in defining data visibility A profile sets the limitation for what an user can
for a particular user. do in the organization.
Roles provide a feature to control access Profiles help to decide record privileges i.e.
to records by impacting reports. For assuming the user can observe the record, it
example,“My Teams” filter. Roles concludes what the user can function, edit,
function if a security model (OWDs) of an delete, view on that record. It controls other
Role Profile
Role:A role helps manage and regulate the Salesforce access that affects reports.
Also, it allows for controlling user visibility over data within an organization. Users
who can access the data and perform operations on it are given a specific role.
Candidates with a specific role can share the reports with other team members.
Answer: A Permission Set is a collection of settings and permissions that give users
access to various tools and functions. Permission sets extend users’ functional
access without changing their profiles.
Sharing rules are used to extend sharing access to users in public groups, roles, or
territories. Sharing rules give particular users greater access by making automatic
exceptions to your org-wide sharing settings.
14. What is use of muting permission set in permission set group
With the help of the given below methods we can share records in Salesforce:
Role hierarchy:
Whenever a user is added to a role, the user above the current user in the
hierarchy of roles will have access to reading the records and inheriting the
permissions.
Follow the steps for role hierarchy: Go to Setup → find manage users’ →
roles → set up roles → click on ‘add role’ → provide name and click on save.
OWD:
Manual sharing:
Apex sharing:
Sharing object is available for each and every object in Salesforce. For
example, the Account object’s share object is AccountShare.
By using Apex, if we want to share the records then we have to create a
record to the shared object.
16. What are Audit Fields in Salesforce?
Audit Fields in Salesforce are special fields that track information about your
records that can be valuable for audit purposes. Typically these fields include:
CreatedByID. CreatedDate
The Audit trail in Salesforce is a unique feature that helps in tracking the changes
that have been made in the organization by you and other administrators. It would be
helpful for the organization with more administrators. This audit trail shows you the
information of the twenty most recently made changes in your organization.
Prioritize and assign records to teams that share workloads. There’s no limit to the
number of queues you can create, and you can choose when queue members
receive email notifications.
Groups are sets of users. They can contain individual users, other groups, the users
in a particular role or territory, and/or the users in a particular role or territory plus all
of the users below that role or territory in the hierarchy.
It is used to show
It is used to show a single user’s specific data, such as the
organizational-wide data to
number of sales closed, leads converted, etc
a set of users
Static dashboards Dynamic dashboards
Reports will give a clear picture to the management. Management will make use of
reports to track progress towards its various goals, increase revenue, and control
expenditure. Reports will also help to predict trends and thus gives the advantage of
the increase in profits.
Matrix report
o A report is formed by grouping the records by rows as well as columns.
It is used when you want to see data by two separate dimensions that
aren’t related, such as date and product.
o Example: Summarize opportunities by account horizontally and by
month vertically.
Summary report
o A report that provides a listing of data with groupings and subtotals. It
is used when subtotals are needed, based on the value of a particular
field, or when you want to create a hierarchically grouped report.
o Example: All opportunities for your team subtotaled by owner and sales
stage.
Tabular report
o A report that provides details of a company in tabular format. It is used
when you want a simple list or an item list with a grand total.
o Example: These reports are used to list all accounts, list of
opportunities, list of contacts, etc.
Joined report
o A report that is created by the mixture of any combination of reports.
Like matrix report plus summary report can give you a joined report.
Also, matrix reports and tabular reports can give a joined report.
o Example: You can develop a report to display opportunity, case, and
activity data for your accounts.
The report type is simply a template in Salesforce which is built based on objects
and relationships in between objects and fields. Every report in Salesforce can be
created only based on the report type.
A bucket field lets you group related records together by ranges and segments,
without the use of complex formulas and custom fields. Bucketing can thus be used
to group, filter, or arrange report data. When you create a bucket field, you need to
define multiple categories (buckets) that are used to group report values. The
advantage is that earlier, we had to create custom fields to group or segment certain
data.
Validation – Using Validation in Salesforce is a great way to keep data clean. This
can come in a few different forms such as required fields, using picklists over free
text fields, validation rules, as well as setting correct permissions. All of the
mentioned features are simply trying to ensure that users can only enter data
they should be entering. This is one of the most effective prevention methods for bad
data.
Duplicate Management – A common issue for users and admins using Salesforce,
is duplicates. They can come from various sources including an initial data load,
marketing leads (events/website), or users themselves manually entering them.
Salesforce has various simple but powerful duplicate tools to prevent this.
Deduplication Tools – If bad data has become such a problem and is beyond
repair, luckily there are AppExchange Apps that can help.
Cannot import cases and opportunity. Can import cases, events, tasks, and opportunities
In Salesforce, Data skew is a condition which you will occur when working for a big
organization when there are more than 10,000 records. So, when users perform
updates performance issue will be encountered. It happens because of data skew.
Screen Flow: With Screen Flow you can create a custom UI (user interface) and
guide users through a business process that can be launched from Lightning Pages,
Experience Cloud (previously known as Community Cloud), quick actions and more.
Record-Triggered Flow: This Flow launches when is record is created, updated, or
deleted. So far, we have used Apex triggers for these automations some of which
can now be done using Flows.
Scheduled-Triggered Flow: This flow launches at the specified time and frequency
for each record in a batch. Traditionally we have met this kind of requirement using
Apex batch jobs.
Platform Event Flow: Launches when a platform event message is received. For
example, you can pump the data from external system in Platform Events and then
use Flows to split and save the records in different objects.
Auto launched Flow: Launches when invoked by Apex, Process Builder or even
REST API.
31. Name a few global variables which are used in formula and validation rules.
32. Is there any special permission available to edit read only fields. Please
explain.
Ans: Yes. There is a system permission named ‘Edit Read Only Fields’ which allows
to edit read only field values. For System Administrator profile, this is enabled by
default.
33. What are the differences between Object-specific action and global
actions?
a) Both types can create records, but only object-specific actions can update
records.
b) Object-specific create actions create records that are automatically
associated with the current record. A record created by a global create action
has no relationship with other records.
34. Mention one impact point to check before deleting a role from the org.
Ans: Before deleting a role, we should check whether the role has been used in any
sharing rule. If the role is deleted, the sharing rule is also deleted.
35. Let’s say I create two accounts a1 and a2. Now I make a2 as the parent of
a1. Now what will happen if I try to make a1 parent of a2.
Ans: The error ‘A parent account can’t be the child of an account it’s already a
parent of’ will be shown.
36. How do you pass the current record id to a screen flow? Also is it possible
to send the entire record?
Ans: In order to pass current record Id, we need to declare a variable of name
‘recordId’ of type text and select the option ‘Available for Input’. To pass the entire
record, we can create a variable of name ‘recordId’ of type Record and select the
object type as that particular SObject.
Ans: From Setup, go to Company Information and copy the instance Id. Now go to
status.salesforce.com and search with the same instance id to get the details.
Ans: A big object can store massive amount of data from other object and even from
external objects. Clients and external systems use a standard set of APIs to access
big object data. A big object provides consistent performance, whether you have 1
million records, 100 million, or even 1 billion.
Ans: No. In order to get the value from the formula field, we need to create some
automation to copy the data to a new field and use that field in the roll up summary
calculation.
40. Suppose there is a custom field which has a default value but not added to
the page layout. Now, if you clone a record from the UI, what would be the
value of the field in the new record?
Ans: The value would be the default value set at the field level, not the value which
was populated in the previous record.
Ans: Approval processes can be deactivated and deleted. If there are already
records in pending status, an approval process can be deactivated but not deleted.
In order to delete an approval process, we need to ensure there are no records in
the org which is locked in the approval process else an error will be encountered.
Ans: We can select up to 3 leads during merging. Those are identified as duplicates
based on the duplicate rule condition on the org. One of the lead is considered as a
Master record and the read only and hidden field values are retained from that lead.
Once it is merged, the resultant record is a single lead record and the other two
records are deleted.
43. What is Apex Hammer?
Ans: Before each major service upgrade, Salesforce runs all Apex tests on your
behalf through a process called Apex Hammer. This is run across all the orgs.
Ans: Yes. We need to enable a system permission ‘Bulk API Hard Delete’ for the
user in order to do hard delete. Also, we need to select the Bulk API option in the
data loader before the deletion.
Ans: Yes. We can show validation error message in screen flow for certain
components using the Validate Input option. In this option, the condition which is
provided must be false for the validation rule to fire which is in contrast with the
standard/contrast validation rules.
47. You have created a custom object. While creating a report on the object,
you are not getting the option to select the object in the report builder. What
could be the issue?
Ans: Check if the Allow Reports checkbox is enabled in the object detail page.
Ans:
49. How can we enable email approval response? Mention a few response
keywords which will approve/reject the request.
Ans: From Setup -> Process Automation Settings, we can enable the settings.
Approve, Yes, Reject, No etc. are few of the responses.
50. You are not getting an option to create list custom settings. Which setting
needs to be enabled?
Ans: From Setup -> Schema Settings -> Enable Manage list custom settings type.
51. Once a lead is converted it is not visible anymore in the UI. Is there any
permission available to view converted leads?
Ans: Yes. There is app permission, View and Edit Converted Leads.
52. You are trying to convert a master detail relationship field to lookup
relationship. But you are not able to see the change field type button. What
could be the reason?
Ans: Check there should be no roll up summary field present in the parent object.
Also, if there is any deleted roll up field present in recycle bin that needs to be
erased as well.
53. One of the users in your org is not able to create campaigns. You checked
the profile/ permission sets and ensured that he has access to create
campaigns. What could be the reason?
Ans: Check if the Marketing User checkbox is selected in the user detail page of the
user.
Ans: If the public group has been used in any sharing rule and associated with any
records in the context of sharing, the associated records appear. Now, an option is
given to delete the public group as well as the sharing of all the records.
Ans: If the queue is associated with any records or sharing rules, the references are
displayed. The queue cannot be deleted unless the references are removed.
Salesforce provides CRM software and cloud-based solutions that help enterprises
to connect better with their customers. It supports businesses to manage their
customer's data and track their activities efficiently.
Tableau
Pardot
Heroku
Mulesoft
Demandware Inc
SalesforceIQ
Objects in Salesforce are used as database tables that are used to store information
of an organization. We have two types of objects in salesforce, they are.
Standard Object: These are the objects provided by the salesforce, which include
contacts, accounts, opportunities, leads, cases, campaigns, products, contracts,
dashboards, etc.
In Salesforce, you can customize apps to match your requirements, or you can build
new applications by combining custom and standard tabs.
By following this procedure, you can build an application. However, you want.
Custom app: This type of apps can be used in every business scenario. It is widely
used in the market.
Console app: This type of app can be used only in the client service business,
where we focus on solving the client’s issues. It is not comparatively, widely used in
the market.
Owner,
Name,
Last modified by,
Created by.
7. What are Audit Fields?
There are four types of reports that are available in Salesforce, which are as follows.
The tabular report is those that give us the total in a tabular format.
Matrix reports the format where grouping is done based on columns and
rows.
The summary report gives us detailed reports based on columns.
Joined reports which are capable of allowing two or more reports in one
report.
The Audit trail in Salesforce is a unique feature that helps in tracking the changes
that have been made in the organization by you and other administrators. It would be
helpful for the organization with more administrators. This audit trail shows you the
information of the twenty most recently made changes in your organization.
15. What is a profile? Can two users have the same profile?
As far as the second question is considered, the answer would be yes. The people
who work in one department have the same profile. So the people who work under a
particular department would be assigned with the same profiles.
As we have seen in the sales profile, many people work under it and every person
who works under is assigned the same profile. Hence any number of people can
have the same profile.
Role: In Salesforce Role is meant to increase the data visibility to a particular user. It
can be done by sharing rules or by building a role hierarchy. Using roles, you can
control the ac
Profile: Unlike the roles profile is mandatory for all, and it stays at the object level. It
is treated as a building pillar of an organization.
Master-detail relationship
Lookup relationship
External Lookup
This Master-Detail relationship is the same as the relationship between a parent &
child. In this aspect, the master is treated as Parent, and the Detail is a child. The
master Object takes control of the behavior of the Detail object. The survival of the
child is dependent on the parent because if the Master gets deleted the Detail will
also automatically get deleted. You can create Roll-up summary fields in master
records which helps in calculating the Min, Avg, Sum of the child records.
The relationship between the two objects is called a lookup relationship. Lookup
relationships connect two object links together so that you can look up from related
items to other items. It can be one-to-one or one to many.
20. What is an External lookup?
The external lookup relationship is used to connect the child object to the parent
object. The child object may be either a custom, standard, or external object. It uses
to identify the correct map of the child object with the parent external object.
The external lookup relationship values fields are matched against the External Id
values.
A protocol that defines a uniform way of passing XML-encoded data. SOAP Stands
for Simple Object Access Protocol.
The computer system executes one or more tasks according to the set of rules and
scheduled tasks.
The trigger is defined as an Apex code that executes before or after the following
functions such as insert, update, delete, etc. trigger enables to perform custom
actions before and after modifications to the records of Salesforce.
28. What are the actions in the workflow?
Field update
Task
Outbound message
Email alert
29. What are the main things that need to consider in the “Master-Detail
Relationship”?
Record level access is determined by the parent, Mandatory on the child for
reference of the parent, cascade delete (if you delete the parent, it can cascade
delete the child).
30. How many records can be shown in matrix, tabular & summary reports?
31. Is the Roll-Up Summary field is only possible in the Master-detail relationship?
If you delete the parent record in the MDR, the child record also gets deleted in
MDR.
No, we cannot change the license when we are creating the profile.
It creates a link between the custom object and the standard object recorded in a
related list. This is helpful to find the product's defects.
We have some fields which are indexed by default in Salesforce, which are :
Name
ID
Owner fields
Master-detail relationship fields
Lookup fields
Last modified dates
Audit dates
The Fiscal year is known as the starting and ending date of a company's financial
year. We have two types of financial years in Salesforce which are as follows.
There are many custom fields available are Picklist, Currency, Date, Text, Picklist
(multi-select), Email, Percent, Number, Phone, Text area, Lookup relationship,
Geolocation, Checkbox, Master-Detail relationship, etc..
49. What are the different ways to store various types of records in Salesforce?
We have five different ways in Salesforce to store various types of records such as
images, files, and documents.
They are
Attachments
Google drive
Chatter Files
Libraries
Attachments.
50. What is the main difference between data table vs page block table tags?
Page block:
DataTable:
There are many things that can contribute to data loss in Salesforce. Which
includes :
The sharing rules are used only for allowing greater access to records not for
restricting.
Role Hierarchy :
If we add a user to a role, the user who is above in the role hierarchy will have read
access.
Setup → manage users → roles → setup roles → click on ‘add role’ → provide name
and save.
OWD:
OWD can be Private, Public Read Only, Public Read and Write.
Manual Sharing :
We can see this button detail page of the record and this is visible only when the
OWD setting is private.
Using the insert method we can insert the records but if any error occurs in any
record system will throw an error insertion fail and none of the records are inserted. If
we want to execute partially the success of bulk insert operation we will use
database .insert.
58. Does the user can create insert their own custom logo while creating their own
custom applications?
Yes, users can upload their custom logo in documents, and then they choose that
logo for the organization.
We can customize different things on page layouts like Fields, Buttons, Custom
Links, and Related Lists. We can also create sections.
61. Can the governor limit perform partial DML activity? Eg: we are inserting 200
records in a loop, the Governor limit is hit at the 151st record, then will those 150
records be created?
First, the platform application server compiles the code into an abstract set of
instructions that can be understood by the Apex runtime interpreters.
The compiled code is stored in metadata.
When the end-users trigger the execution of Apex by clicking a button or the
VisualForce page the application servers retrieve the compiled instructions from the
metadata and send them to the runtime interpreter before returning the result.
Apex enables developers to add business logic to most system events like button
clicks related to record updates and VisualForce pages.
The batch apex class deploys the database batchable interface with the three
methods as follows:
Start
Finish
Execute
Start: We use the start method at the beginning of the batch apex job. We use it for
collecting the objects or records, for passing them to the interface for executing. It
returns a DatabaseQueryLocator object that comprises objects or the records sent to
the job.
Finish: We call this method once we finish the batch processing. We use this
method to send confirmation emails or to execute the post-processing operations.
Execute: We use this method for every batch of the records that are sent to the
method. We use this method for data processing. This method does the following:
Email services are an automated process that uses Apex classes to process the
contents, Headers, Attachments of Inbound Email.
Note:
‘United
Country(Key) ‘Japan’ France’ ‘England’ ‘India’
States
For Example, the following table represents a map of countries and currencies
Batch Apex: Batch Apex allows you to define a single job that can be broken up into
manageable chunks, whereas every chunk can be processed separately.
In the Batch Apex it will fetch all the records on which you want to perform the field
update and divide them into a list of 200 records and on every 200 records operation
is performed separately.
This would help us to execute on more than 10,000 records as it won’t perform an
operation on all the records in a single transaction instead it divides them into a
number of subtasks where each subtask may contain records up to 4000.
Example:
If you need to make a field update of every record of account object in your
organization, then we have governing limits that would restrict us from achieving the
above task.
Reason: In a single transaction we can process only 10,000 records. Now in the
above case if we have more than 10,000 records in the organization then we can not
perform this field update.
Anybody who wants to schedule their class they have to implement the schedulable
interface.
Schedule Interface: The class that implements this interface can be scheduled to
run at different intervals. This interface has several methods that are
Public void execute(schedulablecontext sc)
Public class mySchedule implements schedulable
{
Public void execute(schedulablecontext sc)
{
Account a = new Account(Name = ‘Faraz’)
Insert a;
}
}
The trigger is an Apex Code that executes before or after. The following types of
DML Operations:
Insert
Update
Delete
Merge
Upsert
Undelete
1. Before Triggers
2. After Triggers
After Triggers: After Triggers Before Triggers can be used to access field values of
the records that are stored in the database and use this value to make changes in
other records.Syntax:Trigger trigger_name on Object_Name(trigger_events)
{ Code_block } WHERE trigger_events can be comma separated list of events.
This type of sharing is available only with users to modify all data permissions.
Only these users can add/change apex-managed sharing.
Apex Managed Sharing uses a Sharing reason (Apex Sharing Reason)
77. What is the Usage of the apex program within the VisualForce page?
When you want to call the apex class on the VisualForce page we have to declare in
the following format.
A Sandbox helps you when you want to test the newly developed application on
force.com or VisualForce page. It is not possible to check something in the
production environment if do, so it creates a problem for the regular functioning. So,
to get out of this problem developers use Sandbox to test the application.
Developer
Developer pro
Partial copy
Full
Ans: Static resources allow you to add the content that you want to reference it on
the VisualForce page, which includes things like images, Javascript, archives, CSS
files, etc. The maximum size of a static resource of an organization is 250 MB.
Collections
User-defined types
subjects
Primitive types
Built-in Apex types
A query language that allows you to construct simple but powerful query strings and
to specify the criteria that should be used to select the data from the platform
database. SOQL Stands for Salesforce Object Query Language.
We must avoid using index values like Trigger.New[0] as we never know how many
records we get in Trigger.New at runtime.
Insert ListForBulkDML;
Salesforce Object Query Language is used to query records from the database.com
based on the requirement.
1. Static SOQL
2. Dynamic SOQL
Static SOQL:
Example:
Dynamic SOQL:
It is used to refer to the creation of a SOQL string at run time with Apex code.
Syntax -
Example:-Queries
With API version 18.0 and later/you can use group by with aggregate functions,
such as sum() or max() to summarize the data and enable you to rollup query results
rather than having to process the individual records in your code.
SOSL statement evaluates the list of sObjects, where each list contains the search
results for a particular sobject type, The result lists are always returned in the same
order as they were specified in the query.
If a SOSL query does not return any records for a specified sObject type, the search
results include an empty list for that sObject.
Example: You can return a list of accounts, contacts, opportunities, and leads that
begin with the phase map.
List < list < subject >> search list = [ find 'map*' In ALL FIELDS RETURNING
Account (ID, Name), contact, opportunity, lead ];
Note:
The syntax of the class on Apex differs from the syntax of the FIND clause in
the SOAP API.
In Apex, the value of the FIND cause is demarcated with single quotes.
Example:1
FIND 'map*' IN ALL FIELDS RETURNING account (Id, Name], Contact, Opportunity,
Lead. In the Force.com API, the value of the FIND Clause is demarcated with
braces.
The remote method invocation you add to the VisualForce page, written in
javascript.
The remote method definition in your Apex controller class.
This method definition is written in apex, but there are few differences from
normal action methods.
The response handles callback function you add to or include in your VF
page, written in javascript.
Syntax -
97. If one wants to actually compare the variable name in a query what operator
should be used?
98. When one wants to pass the collection to the query instead of passing one value
which keyword helps us?
IN - keyword.
100. Mention 2 reasons why we prefer VFP instead of using configuration(no coding)
things?
inputField - copy the field from any object and display on a VF page | like copy paste
work.
Use the future annotation to specify that these methods are executed
asynchronously.
Syntax:
A web directory where hundreds of app exchange apps are available to Salesforce
customers to review, demo, comment upon, and /or install. Developers can submit
their apps for listing on the appexchange directory if they want to share them with the
community.
106. Which tag is used with both radio buttons and picklists to create the selectable
values?
We use <Apex:selectoption>
107. Which field cannot be added to a custom index?
Workflow:
Trigger:
109. What are some apex classes that are commonly used within?
The transient keyword prevents the data from being saved into the view state. This
should be used for very temporary variables.
111. What is the maximum number of field dependencies we can use in the
VisualForce page?
Click on your Name tab, then click on Personal and you will find Reset my security
token.
A wrapper or container is a data structure, a class type, or an abstract data type that
contains multiple collections of objects. It helps in displaying various objects on a
VisualForce page in a single table.
Public websites and applications that are directly integrated with your Salesforce
organization without requiring users to log in with a username and password.
A Tab is a user interface to display custom object data or other embedded web
content to a user. We have three types of tabs in Salesforce which are:
Custom Tabs.
Visualforce Tabs.
Web Tabs.
118. What are the types of email templates that can be created in Salesforce?
119. If we want to share records based on conditions like share records to a group of
users. Whose country criteria is India, What are the steps to be followed?
Apex sharing: Share object is available for every object(For Account object share
object is AccountShare ). If we want to share the records using apex we have to
create a record to the shared object.
121. Is it possible to make changes to the apex trigger/apex class in the production
function?
No, you can not do that if you want to make any edits to the apex trigger/apex class
that should be done in a sandbox environment.
122. What are the things that can be customized on page layouts?
Page layouts allow you to personalize or customize the given page objects or
records. It helps in customizing or designing the page according to your
requirements. Page layout editor helps you in customizing the pages. Using this
page, you can customize things like buttons, fields, custom links, and related lists.
123. How to invoke batch apex job (or) how to execute the batch apex job
programmatically?
Syntax:
Note: The class name that we are passing to the database.execute batch( ) method
should be the object of the class which has implemented the database.batchable
interface.
124. Will Visualforce still support the merge fields usage like S-control?
Yes. Just like S-Controls. Visualforce pages support embedded merge fields.
125. As things are time taking client wants a report wherein a single screen, without
doing anything, can see SALE PER COUNTRY. And in another report, sales per
country per mobile brand.
126. As a client wants to motivate sales reps to make more efforts, they are going to
analyze the sale done by every sales report and reward them. They want a report
where they can see country-wise sell AlSO IN the SAME REPORT, sales rep wise to
sell. So they can also see in which country how the sale is & they want this analysis
to be separate but in the SAME REPORT.
127. The client wants to see data from mobile sell DB and Home Appliance sell DB
together to take the decision of the next financial year's planning. Also, the client
wants to group the sell, discount-related columns grouped together?
They can see all the required data by using the Joined Report.
128. When two objects are connected with each other using r/s, then on secondary
record the relationship will be shown using the field. On the primary record, the
relationship will be shown using a related list.
Lookup R/S:
1. It is used to connect 2 or more objects with each other as per the business
requirement.
2. It works on standard objects and custom objects.
3. It is so simple to type.
4. It helps to loosely connect 2 objects.
5. It is used whenever we don’t have much strong dependency between 2
objects.
129. There is only 2 MDR allowed per object how many custom levels it can have?
130. There is an object called Employee Details, and another object called Salary
Info, think from a business perspective. If you want to combine the 2 objects, what
will you choose in the relationship?
131. Assume that you require PC’s in bulk and have given an order to ‘XYZ’
company & they found a bulk supplier and asked to process, what would be the
relationship between the company and the supplier?
132. Business Requirement - Assume there is a finance dept, there are many users
and they have access to an object called finance, In that object, there is a field called
“Bonus”, and in the dept 10 users, only one should not see the field?
Scenario: Creation of Permission set for the users, other than the user who should
not have the Bonus field access.
Description:
Object: profit & loss.
Condition::
OWD: Private.
Role: N/A.
(Hint: Does he have min access to work on the object & OWD= PRO).
(Hint: Does he have min access to work on the object & OWD= PRW).
137. In the above scenario can Stephen see the record of Celia or not?
No.
Yes.
We use the Roll-up summary field to calculate the values for the associated records,
for example, a related list. We can also use it for creating the values for a master
record- according to the values in detailed records. But, we must connect the master
and the detail with a master-detail relationship.
2) Explain Queues?
In Salesforce, Queues help us to distribute, prioritize, and assign the records to the
teams for sharing workloads. Queues are applicable to leads, service contracts,
custom objects, cases, etc.
Escalation rules apply to escalation cases according to the rules specified in the
escalation rule entry. Besides rule entries, we can also create escalation actions for
determining what happens when the case escalates. The escalation rule can
reassign a case to another support agent or a support queue.
Criteria: Criteria is the “if” portion of the statement. We have to set criteria for the
workflow rule. First, we have to create a workflow rule and later configure the criteria.
Action: Action is the “then” portion of the statement. The action tells us what to do
when the criteria are satisfied and occurs after the workflow rule configuration. We
can add a time-dependent action or an immediate action for a particular workflow
rule.
Workflow Task
When we have to assign the tasks to a salesforce user, you haunt a workflow task. A
workflow task allocates a new task to a role, user, or record owner. It assists us in
defining different task parameters like a priority, status, due date, and subject.
Workflow Alert
Workflow Alert is an email that an approval process or a workflow rule creates in the
salesforce and is transmitted to different recipients.
8) Explain Auto-Response?
In Salesforce, we use custom labels for creating a multilingual application. Using the
native language, they give information to users in the form of help texts and error
messages. We can define the custom labels as custom text values that we can
access from the Apex class or Lightning components and promptly or even the
Visualforce page. We can translate these values into the language supported by the
salesforce. Through the following path, we can access custom labels:
10) What are Sharing rules and what are the different types of sharing rules?
Sharing rules give sharing access to the users associated with the public groups,
roles, or territories. It gives a higher level of access with the exceptions, far from our
organization settings. Following are the two kinds of sharing rules:
Guest users are the users who do not have user accounts in our organization. They
are also known as unauthorized users as they do not have to log in. We can make
the pages accessible. Unauthorized users can create or edit the records.
Generally, we have various limitations and considerations for assessing. Yet, we can
use this feature for solving use cases, and we do it financially because the guest
user licenses are free.
Here is the list of most frequently asked Salesforce interview questions and answers
discussed below
To assure that our code satisfies particular standards, Apex test coverage displays
to you how many lines of code in our classes or triggers have been tested by the
tested methods. Test coverage percentage is the result of the number of the covered
lines divided by the sum of uncovered lines and covered lines. To deploy to
production, we need a minimum of 75% test coverage.
3) Define OAuth?
Connected App integrates the salesforce through APIs, and Connected Apps utilize
OAuth, SAML for authenticating, providing sign-on, and providing tokens for using
the Salesforce APIs.
Outbound Message is an automation function that can shoot from the workflow rule.
We can send the message to explicit web services that include web services, which
start other processes in explicit systems.
We can define specific fields as an External ID on the object. We can use these
External ID fields for balancing the data from explicit systems with a distinct
reference ID.
For instance, if we have to balance the data from the explicit accounting system with
the Salesforce Accounts, we have to promptly use an external ID field to refer to the
unique ID of the accounting system in place of the Salesforce ID.
First, we have to define the page section that is going to be refreshed, and then we
have to define the event that leads to refreshing. The method changes if the area
being refreshed is similar to the one managing the event. It also relies on if we are
processing on the server or if we have to change the user interface.
8) How can we invoke the javascript controller action by using a component markup?
By using the action provider, we can invoke the javascript controller action through a
component markup
9) What are component and application events?
Application events
By using any component, we can fire the application events, and we can manage
them. Application events do not need any relationship among the components;
however, these components should be a part of an application.
Component events
Child components fire the component events, and Parent components handle the
component events. We use component events when we have to send a value from
the child component to the parent component.
We can perform the above process through Pagination. We can achieve pagination
through the following ways:
Through StandardSetController
Through Offset and Limit keywords in SOQL Query
<apex:pageMessages></apex:pageMessages>
ApexPages.addMessage(new ApexPages.Message(ApexPages.severity.Error,
‘Error Message’));
12) What are the differences between Custom Objects and Custom Settings?
Custom Objects store the data in the Custom settings store the data in the
database. Application Cache memory.
Custom objects have to use SQL queries for Do not need to use SQL queries for fetching
fetching the records from the database. the records.
In custom objects, all data types exist. In Custom settings, only confined data types
exist when compared to custom objects
On Custom objects, we can create apex On List Custom settings, we cannot create
triggers and validation rules. apex triggers and validation rules
We can create a tab for custom objects. We cannot create a tab for custom settings
14) Can you give an example of Salesforce API and its importance?
Salesforce has different API’s that allow us to communicate with the system in
various ways:
REST API: REST API will enable us to integrate with the salesforce applications
through HTTP methods in either JSON or XML formats.
Bulk: Bulk API gives us programmatic access that allows us to load the data into our
salesforce enterprise rapidly.
Streaming: We can use Streaming API for receiving the notification for the changes
to the salesforce data that equal the SOQL query we define. Streaming API is
functional when we have to push the notification from server to client according to
the criteria we define.
Bucket Fields classify the records of the salesforce reports without any custom field
or formula; Bucket fields are available only in the reports. When we create a bucket
column, then various classifications of the group report values.
We use isBlack() for the text fields. Since text fields cannot be NULL, even though
nothing is given as a value, ISNULL() function fetches only empty values. If we use
ISNULL() with a text field, then it returns false.
Salesforce records data on the details like customer details, sales numbers,
customer served, and repeat customers and use of these records for creating
detailed charts, dashboards, and reports. In this way, it tracks the sales of our
organisation.
18) What is the limit of the Data.com records that we can add to Salesforce?
In the user section of Data.com, we have to discover our name to see our monthly
limit. It will provide details like how many records we can export or add for this
month. The user enters setup and types the user in the Find box and chooses
prospector users.
The batch apex class deploys the database batchable interface with the three
methods as follows:
Start: We use the start method at the beginning of the batch apex job. We use it for
collecting the objects or records, for passing them to the interface for executing. It
returns a DatabaseQueryLocator object that comprises objects or the records sent to
the job.
Finish: We call this method once we finish the batch processing. We use this
method to send confirmation emails or to execute the post-processing operations.
Execute: We use this method for every batch of the records that are sent to the
method. We use this method for data processing. This method does the following:
Yes, we use a getter method for returning the values for a controller. Each value
computed by the controller and shown on the page should have a getter method.
On the other way, we use the setter method to pass the user-defined values from the
page markup to the controller. In the controller, we execute the setter method
automatically.
Managed
Unmanaged
We use managed packages for distributing and selling the applications to the clients.
Developers sell user-friendly applications and licenses by using AppExchange for
managed packages. These are entirely updatable in the event of continuous
upgrades; we perform the removal of fields or objects.
The reRender attribute defines an elements list that we can update dynamically
through the AJAX library of the Salesforce. We do not need the entire page to
refresh. Only a part of the page detected by the components is named in the
“.rerender” attribute.
By using the <chatter: feed> component, we can display the chatter feed.
Example:
<apex:page>
<chatter: feed entityId=”{!$User.Id}”/>
</apex:page>
Blob variable is the variable that is intended to gather binary data. tostring() converts
the blob back into the string.
It's not difficult to get started with a Salesforce career. Although getting an entry-level
salesforce job takes time, it is possible.
There are lots of different groups or communities on the internet. These are some
simple ways for learning Salesforce's new features. Joining such communities can
help you enhance your skills, which are necessary for obtaining a good job.
Getting trained and certified in Salesforce is another great way for a beginner to gain
relevant skills with the platform and land a job.
Salesforce is popular because it has features that no other CRM software has,
including contact management, workflow creation, task management, opportunity
tracking, collaboration tools, customer interaction tools, analytics, and an easy,
mobile-ready interface. There are further features for marketers, such as social
network integration, marketing lead monitoring, and email integration, in addition to
these. Sales forecasting, sales communities, and sales lead monitoring are all
beneficial tools for salespeople.
Salesforce is expected to grow in popularity and expand into new SMB markets,
based on these positive predictions. Therefore Salesforce appears to be a viable
career option.
On the other hand, salaries are determined by the employer, location, level of
expertise, and type of certification. Naturally, if you have more credentials under your
belt, your bundle will be more expensive.
Obtain one or more Salesforce certifications if you want to land a new job with an
arsenal of in-demand skill sets or move laterally to a well-paying Salesforce job with
greater career prospects.
There are certain skills that any good Salesforce developer should have. These
include:
Determine the users' requirements, and then design, test, and develop
software to suit those needs.
Create successful project planning by designing Salesforce solutions. Add
value to the project definition, development, and deployment stages.
Suggest improvements to existing client apps, programmes, and systems in
the form of new software.
For internal users, create and deploy Internet- and intranet-based programs.
Address any potential data quality issues and develop strategies to overcome
any system deficiencies.
For future reference, document every aspect of the company's entire
inventory of applications and systems, particularly in relation to updates and
maintenance.
Collaborate with other tech experts to develop the best software.
Salesforce Admin
Salesforce Developer
Salesforce Marketer
Salesforce Business Analyst
Salesforce Functional Consultant
Salesforce Architect
Implementation Experts
CPQ Specialists
Here are a few suggestions to keep in mind while creating your Salesforce
Developer CV. Since the Salesforce Ecosystem is so vast, you'll probably be familiar
with a number of Salesforce tools, technologies, and services. You must choose to
highlight experiences that the recruiter finds appealing.
Communication
Customer Service
Problem-solving
Project Management
Although there are many opportunities for Salesforce professionals in the market,
this does not mean that you should ignore the necessity of being well-prepared for
every interview that you attend.
You may only get one chance to impress a potential employer. Follow our tips to give
yourself the best and succeed in the interview.
Research the Company: We are sure that everyone views a company's website
before attending an interview, but it is no longer sufficient.
We recommend that you look at the company's social media accounts (Instagram,
Twitter, Facebook, etc.) to get a sense of the company's culture. You should also
look at LinkedIn company sites, hashtags, Google news, and anywhere else where
information about a firm is stored online.
Understand what the recruiting manager is looking for: It's important to know
what the hiring manager is looking for, not simply the job title.
Use real-life examples: It may sound simple, but it's surprising how many times
after an interview, we speak with a Salesforce professional and they recollect a
previous accomplishment that they had forgotten about due to interview anxiety or
other causes.
To set yourself apart, make sure you prepare particular facts and speak about your
previous-role accomplishments.
Research the hiring manager: Perhaps not as entirely as you stalked the company,
but be well-prepared for the interview by knowing:
The role of the recruiting manager, how long they've been with the company,
and who's on their team are all factors to consider.
Where they've previously worked and with whom they've collaborated
They may post work-related content in professional groups that they are
members of.
Any interests you have in common could be a good fit.
Prepare some common interview questions: While you can't predict what the
company will ask, you may prepare by familiarising yourself with popular interview
questions from StackOverflow and other communities.
All data related to an enterprise can be stored in Salesforce.com, and for that, there
is a need for a junction object, which is a custom object. The custom object has a
master-detail relationship. We can create a master-detail relationship between two
objects and then connect a child object as a related list. Custom objects, which can
be listed in custom settings, have a set of static data that is reusable.
In the process, the custom object has to be defined first, and then the below-
mentioned steps need to be followed:
In Salesforce, we can link the standard and custom object records in a related list. It
is done by the object relationship overview. Various types of relationships can be
created to connect specific business cases with specific customers. It is possible to
create a custom relationship on an object and define various relationship types.
One to many
Many to many
Master-Detail
An app in Salesforce is a container that contains a name, a logo, and a group of tabs
that work as a unit to provide specific functionality. Users can switch between apps
using the Force.com app’s drop-down menu at the top-right corner of every page.
Want to learn about Salesforce? Check out our Salesforce Tutorial for
beginners.
There are two types of actions in a workflow in Salesforce, which are mentioned
below:
Depending on the profile assigned, users gain access to Salesforce. One profile can
be assigned to many users. Let’s consider an example scenario where the admin
creates a sales profile. Now, the admin has to give access to one sales profile to
multiple members of the sales team.
However, the admin cannot give a user gain access to more than one profile
because sales reps should only have access to the sales profile. So two profiles
cannot be assigned to one user.
Tableau
1. Pardot
2. Heroku
3. Mulesoft
4. Demandware Inc
5. SalesforceIQ
If an organization has various Salesforce administrators, the audit trail lets you track
all the recent changes made by other admins. It can store up to six months’ worth of
data.
15. What happens to the Detail (Child) record when a Master (Parent) record is
deleted?
On the other hand, in a lookup relationship, the child record will not be deleted, even
if the parent record is deleted.
16. Can you have a roll-up summary field in the case of a Master–detail
relationship?
Yes, we can have a roll-up summary for a master-detail relationship but not for a
lookup relationship. This is because a roll-up summary field is used to display a
value in the master record based on the values of a set of fields in the detail record.
17. What is an sObject type?
An sObject is any object that can be stored in the Force.com platform database.
Apex allows the use of a generic sObject abstract type to represent any object.
For example, ‘vehicle’ is a generic type, and ‘car’ and ‘motorbike’ are concrete types
of ‘vehicle’.
18. What are triggers in Salesforce? How are they different from workflows?
Triggers in Salesforce are called Apex triggers. These are distinct and available
specifically for common and expected actions like lead conversions. It is just a piece
of code that is executed before or after a record is inserted or updated.
Trigger.new returns a list of records that have been added recently to sObjects. The
records that have yet to be saved in the database are returned. Only insert and
update triggers have the sObject list, and records can only be modified
before.trigger.
Table: The report data can be shown in column form using a table.
Visualforce Page: It is used for creating a custom component or showing
information that is not available in other component types.
Custom S-Component: This contains the content that is run or displayed
in a browser like an Excel file, ActiveX Control, Java applet, or custom
HTML web form.
Visualforce can be defined as the user interface for the Force.com platform. It is a
component-based framework that can include over 100 in-built components. It
includes a tag-based markup language, and each Visualforce tag corresponds to a
page or a field.
A static resource lets us upload content that is in the form of .jar and .zip formats,
style sheets, JavaScript, and so on. It is recommended to deploy a static resource
rather than uploading files to the Documents tab since it is possible to pack a set of
files into a directory hierarchy and upload it. These files can easily be referred to a
Visualforce page.
Salesforce Object Query Language (SOQL) lets us search for only one
object. We can query for all types of fields in SOQL. Data Manipulation
Language (DML) operations can be performed on the query results.
Salesforce Object Search Language (SOSL) lets us search for multiple
objects. However, in SOSL, we can query only for texts, emails, and
phone numbers. Also, DML operations cannot be performed on the
search results.
Execute method:
1 global void execute(Database.BatchableContext BC, list<P>){}
Finish method:
1 global void finish(Database.BatchableContext BC){}
30. What are the different data types that a standard field record name can
have?
A standard field record consists of either an auto-number or text field read-only data
type with a maximum limit of 80 characters. It depends on whether the field name
consists of a unique text ID or a numerical ID.
To create auto numbers, the format should be described while defining the field, and,
later, when every record is added, the number gets auto-generated. For example :
1Sr No-{1}
2Sr No-{2}
We can use Lightning components for a variety of purposes, some of which are
mentioned below:
Governor limits are some of the biggest challenges for a Salesforce developer.
As and when the Apex code exceeds the limit, it issues a run-time exception, which
cannot be handled. The following is a list of some of the key governor limits in
Salesforce:
Collections are the type of variables used to store multiple numbers of records
(data). The different types of collections in Salesforce are mentioned below:
Lists
Maps
Sets
Maps are used to store data in the form of key–value pairs, where each unique key
maps to a single value.
Syntax:
1 Map<String, String> country_city = new Map<String, String>();
37. What is the difference between public classes and global classes in
Salesforce Apex?
The get (getter) method is used to pass values from the controller to the VF page.
Whereas, the set (setter) method is used to set the value back to the controller
variable.
Time-dependent actions in workflow rules can not be added when the following
actions occur.
An Apex class is a template from which Apex objects can be created. These classes
consist of other classes, variables, user-defined methods, exception types, and the
static initialization code.
Salesforce Lightning is a platform that provides tools for every organization to build
next-generation UI and UX in Salesforce. Lightning creates a modern productivity-
boosting user experience. It is used to create a fast, beautiful, and unique user
experience, just like real lightning, so that sales teams can sell their products faster.
Lightning Experience uses the open-source Aura framework. It is a completely re-
designed framework to create a modern user interface.
There are various reasons why Batch Apex is better than Normal Apex, some of
which are mentioned below:
A Normal Apex uses 100 records per cycle to execute SOQL queries,
whereas a Batch Apex does the same in 200 records per cycle. So, it is
very fast when considering the execution of SOQL queries.
A Normal Apex can retrieve 50,000 SOQL queries, but in a Batch Apex,
50,000,000 SOQL queries can be retrieved.
A Normal Apex has a heap size of 6 MB, whereas a Batch Apex has a
heap size of 12 MB.
When executing bulk records, Normal Apex classes are more vulnerable
to encountering errors as compared to batch Apex. The latter is normally
error-free.
Based on the structural differences, Salesforce has four different types of reports:
Tabular A tabular report displays data in the form of an Excel-like table that
Report provides a list of items with the grand total.
Joined A joined report is a combined report that has multiple blocks that show
Report data from different reports, either of the same type or of different
types.
Matrix A matrix report works in two-dimensions and allows you to group
Report records row- and column-wise.
Summary In a summary report, the view is in tabular form itself, but it has more
Report functionalities like grouping rows (only), viewing subtotals, and
creating charts.
There are unique procedures followed by every company for tracking their sales.
Various companies track the performance of sales through data analysis. The
tracking system of Salesforce allows companies to collect basic details for evaluating
the performance, such as:
Junction objects help associate two objects. They are custom objects in Salesforce
that allow to build a master-detail relationship that is established between two
different data objects. It uses a many-to-many relationship to link many junction
objects to several records.
Example: If a candidate applies for a job, then the job profile can be connected to
many applicants, and the candidate can be linked to several other jobs as well. Here,
the junction object will be the ‘job profile.’
Moreover, the instances of a wrapper class help represent distinct objects in the
corresponding table on a Visualforce page.
53. What are the reasons that can cause data loss in Salesforce?
There are various reasons that cause the Salesforce data to be lost, and they are
mentioned below:
54. Can you give an example of a Salesforce API and its usage?
Salesforce provides the following APIs for developers to easily integrate across
Salesforce:
REST: With the help of the REST API you can easily incorporate Salesforce
applications using HTTP methods in either XML or JSON formats. It is the most
suitable choice for developing mobile applications or external clients.
Bulk: The Bulk API provides us with programmatic access especially for quickly
loading and querying large amounts of data into your Salesforce organization.
Streaming: The Streaming API is used to trigger and receive notifications whenever
changes are made to Salesforce data, according to the defined criteria.
55. Can you edit an Apex trigger/ Apex class in the production environment?
Can you edit a Visualforce page in the production environment?
Visualforce pages can easily be generated and modified in sandbox and production,
as well, if they do not comprise a custom controller.
56. What are the different types of email templates that can be created in
Salesforce?
1. Text: Text templates can be created or changed by all the users in the
organization.
2. HTML with Letterhead: Admins and users who have ‘Edit HTML
Templates’ can create this type of template based on a letterhead.
3. Custom HTML: It is an extension of the previous one. Admins and users
with ‘Edit HTML Templates’ can create custom HTML templates even
without the need for a letterhead.
4. Visualforce: Admins and developers can create this template using
Visualforce. It provides advanced functionalities like merging recipient’s
data from multiple records.
With the help of the following methods, we can share records in Salesforce:
Role Hierarchy:
Whenever a user is added to a role, the user above the current user in
the role hierarchy will have access to records and will inherit permissions.
Setup → manages users → roles → setup roles → click on ‘add role’ →
provide name and save.
OWD:
Organization-Wide Default (OWD) lets you set up public read-only or
public write-only for users across the organization.
Setup → Security Controls → sharing settings → Click on ‘Edit’
Manual Sharing:
The owner or person higher in the role hierarchy can give manual access
to users or a group of users to recordsfiles.
Interviewer: What is Salesforce Integration and why is it important?
Web services use a set of protocols and standards to define the rules and formats
for data exchange. The most common protocols used in web services are:
• SOAP web services.
• RESTful web services
SOAP (Simple Object Access Protocol): SOAP is a protocol that defines a
standardized format for structuring messages exchanged between web services. It
uses XML (Extensible Markup Language) to encode data and provides a mechanism
for remote procedure calls.
Interviewer: How can you integrate Salesforce with an external web service?
Interviewee: Salesforce supports the integration with external web services through
the usage of the SOAP or REST APIs. You can consume or expose web services in
Salesforce by generating Apex classes using the WSDL or by making HTTP callouts
to the external service endpoints.
Sales Data:
The Salesforce CRM is helpful in getting the right sales data
that helps you to make the right decisions in the business.
By using the Sales data, you can easily plan your next steps
which can be for increasing sales and marketing with
increasing productivity with accurate data.
Mobility:
The salesforce CRM is portable as you can also use its
Mobile App that will turn your smartphone into a portable
sales office and you can see your dashboards anytime with
the app.
It also gives you options to log calls, respond to new leads,
and many more.
File Sync and Share:
With Salesforce, you can easily share your files and sync
them to track the content in real time.
Searching for files in Salesforce is easy and you can also
subscribe to its alters that will give you time-to-time
notifications when any changes are incorporated into the
files.
Sales Forecasting:
Salesforce provides you to give credits to the right person
and track their progress individually by using forecasts as per
overlays.
You can also track the journey of the leads to find out if they
are interested in the deals or not. It is very helpful in sales to
analyze the leads through its brilliant forecasting.
Lead Management:
The Salesforce app works like a fast lead converter machine
that keeps you informed about the new leads and their
sources. Its automatic emailing system is very helpful to
reach out to your customers and boosts the revenue-
generating system.
The lead management of Salesforce gives time-to-time
updates on the contacts and also uses the sales path to
understand the related documents that are needed in lead
management.
Contact Management:
Salesforce can be used to get the complete details about the
customer and that data is useful to analyze if they are
interested in your particular service or product.
It makes contact management easy for you by providing
critical data of the leads and customers and their interaction
history with your products, services, etc.
4. What are the benefits of a cloud solution such as Salesforce?
Some benefits of Salesforce are that it can help manage customer data, automate
and streamline processes, and provide insights into customer behavior. Additionally,
Salesforce can help sales teams increase productivity, close more deals, and
improve customer relationships.
Check out the sales management course to learn how to effectively manage your
sales team.
Objects in salesforce are considered as database tables that are used to store
important data and other information about the organization. Additionally, it also
provides more features to the company. Salesforce has two types of objects as
follows:
An audit trail is helpful in tracking the changes that you and other administrators
made in the Setup. This feature is very useful when there is more than one
administrator in an organization. It provides you with a history of the 20 most recent
setup changes that are made to your organization and you will also come to know
who made these changes. This way, you will always get to know who modified the
project at what time.
The information that you get in the Audit Trail history includes the changes that are
made, the person who made the changes, and the time and date when the change
has been made.
Salesforce provides various types of relationships with objects that help you to
connect objects in different ways. A junction object is useful when you want to create
many-to-many relationships in Salesforce. This object is useful when a normal
parent-child or one-to-many relationship is not applicable. They can be created by
custom objects and then relating these objects with two relationships such as master
and detail relationships. It becomes important when you are modeling specific data
schemas in Salesforce. For example, a platform StudySolutions works like a junction
object as it stores many-to-many relations between the study object and the solution
object. However, the relation between the study object and the solution object is a
junction relationship in Salesforce.
The validation rules in Salesforce are helpful to enforce the integrity constraints of
the data. In the validation rule, we give several conditions in the formula editor such
that if a condition fails, Salesforce goes to check another condition, and so on. In
case, if all the conditions are failed it saves the record and shows a proper error
message.
Salesforce allows you to create validation rules for the objects, campaigns, users,
projects, and fields. For example, if a user is trying to make changes to the restricted
fields, then it will give him an appropriate error message and only allow when the
validation of an administration or authenticated person is done.
These rules consist of some formula or conditions that evaluates the data in more
than one field in the records to specify if the user meets the required details or not.
Integration Errors: These errors can be one of the reasons for data
loss in salesforce and they can occur when companies are integrating
internal systems and applications with Salesforce like marketing tools
and others. The changes to default configurations result in unexpected
behavior of the platform causing data loss or corrupted data.
Migration Errors: Migrations are very helpful for moving a huge
amount of data somewhere else. To carry out migrations, it becomes
important to consolidate the data and make complex transformations
that increase the risk of data loss.
Human Error: Accidents can happen anytime and anywhere. It is more
often the reason for data loss is a human intervention with the data.
Having more than one administrator can also cause data loss as all the
admins have the same permissions to access the data and any change
done by one administrator may lead to data loss.
10. What is a sObject type?
SObjects are the standard or custom objects that store the data in the database. A
single sObject variable shows a row of data that can be declared with the help of
Apex by the use of the SOAP API of the object.
For example:
This is very similar to SOAP API and the apex allows the use of generic sObject to
represent any object. The new operator that we used in our code still requires the
type of sObject and therefore all instances should be specific to sObjects.
For example:
12. What is the difference between the public and global classes in Apex?
The difference between the public and global class in Apex is as follows:
1. The method defined in a public class 1. The method defined in a global class
can be used by any Apex in the can be used by any Apex that has
application. access to the class.
Getter methods: Whenever a name variable is called, this method returns a value of
that variable to the visualforce page in the Apex. Getter methods invoke the get
method of that variable and for better understanding let us have a look at the
example below:
<apex:outputlabel>{!value}</apex:outputlabel>
In this example, the value variable is used by the visualforce page when it is
declared in the class.
Setter methods: The values from the visualforce page are taken by the
setter methods and stored in the Apex variable name. To better
understand this method, let us have a look at the example below:
public class setterMethod{
this.value = value;
In the above example, the visual force page will try to take the value from the code
and save the values to the apex variables.
14. Give an example of a custom App you could build on the Salesforce
platform.
Data – The records that a business relies on. Such as accounts, contacts, users, etc.
Metadata – The data that describes other data. It is related to the fields, code,
configurations, page layouts, and logic that go into building the look of the salesforce
environment.
This section of the blog covers questions for professionals who already have some
experience of Salesforce but are looking to brush up their knowledge and prepare for
an upcoming salesforce interview.
16. Explain the skinny table. What are the considerations for the skinny table?
Skinny tables are useful when we want to access the fields which are most
frequently used to avoid the joins. Skinny tables improve the performance of specific
operations that are read-only types and these operations can be list views and
reports. These tables sync with the source tables whenever any source table is
modified and that’s the reason they are highly effective.
In order to use skinny tables in your Salesforce account, you are required to contact
Salesforce customer support. Because you cannot create these tables by yourself.
Therefore, you need to contact the customer support of Salesforce to create these
skinny tables.
curl https://<Instance>.salesforce.com/services/data
in the above code, you are required to replace the instance with the instance of your
organization.
“url” : “/services/data/v20.2”,
“version” : “20.2”
20. What are custom labels in Salesforce? What is the character limit of the
custom label?
The custom labels in Salesforce are the labels used by developers for developing
multilingual applications. These applications are used for the representation of the
information to the users in their native languages. Custom labels are very useful to
work with customized values as it allows users of different languages to access the
information in that application.
In Salesforce, you can create up to 5000 custom labels in which the character limit of
a single custom label is 1000. However, if the custom labels are created from
managed packages, then it doesn’t count under this limit.
21. What is an attribute tag? What is the syntax for including them?
The attribute tag is used to store the information that is to be referenced with the
lightning component of the code. Attributes on components work just like the
instance variables in objects.
1 <action:attribute>
In the above syntax, in place of action, you can give another name to the attribute
tag for including it.
22. What are the three types of bindings used in Visualforce? What does each
refer to?
1. Data Bindings: This binding refers to the data set in the controller.
2. Component Bindings: Visualforce components are referred to by the
component bindings.
3. Action Bindings: The action methods are triggered by action bindings
in visualforce.
23. What are the different types of collections in Apex? What are maps in
Apex?
Collections in Apex are the composite data types that permit the developers to
combine or collect multiple types of data into a single variable. There are three
different types of collections in Apex such as List, Map, and Set.
There are some steps that you need to perform to embed a visual flow in a
Visualforce page:
Go to Setup, then find the Flows in Quick Find Box and then select
Flows.
Click on the name of the flow and copy the API’s name.
Now, again from Setup, enter the Visualforce pages and click on define
a new visual force page.
Add the <flow:greatlearning> component at some place between the
<apex:page> tags.
Now you need to set up the name of your Visualflow:
Click Save.
If you want to restrict this visual flow to some users, then you can do
this by going to the security of visualforce pages and enabling the
profiles by adding them to them.
Lastly, you need to add the visual force page to your application by the
use of a custom link or a button.
So, these were the steps that should be followed to add a Visualflow to Visualforce
pages.
Start Method: This method is called at the beginning of the apex job.
This method is called once and returns Database.QuerLocator or
variables, records, objects that passed to the job.
Execute Method: It is called for each batch of records that are passed
to the job. The default batch size for executing the method is 200
records and the maximum number of records it can take up to is 2000
records. There is no guarantee that all the records will execute in the
order they are received from the start methods.
Finish Method: The finish method is used for the execution of post-
processing operations such as sending an e-mail. This method is
called after all the batches are processed.
Salesforce Interview Questions For Experienced
This part of the blog on Salesforce Interview Questions covers questions that
experienced professionals may face in their upcoming interview process. It has a list
of the commonly asked questions for you to be better prepared.
You can have a roll-up summary field for the Master-Detail relationship
in Salesforce, but the lookup relationship is not well to have a roll-up
summary. Roll-up summary fields are useful when we want to show a
value in master records depending on the values of a set of fields in
our detail records. But the detail records must be related to the master-
detail relationship. There are four calculations that you can perform by
using a roll-up summary such as counting the total number of detail
records, sum, and finding the minimum or maximum value.
29. What are the examples of non-deterministic Force.com formula fields?
39. There is a profile by name ‘ReadAccessProfile’ and two users User1 and
User2 have been assigned to it. There is an object X. I want to have ReadWrite
access for User1 and ReadOnly access for User2 for object X. How can this be
accomplished?
1. Step 1: Read Access for both users is common hence in the Profile
settings give ‘Read’ access for the object ‘X’. By doing this User U2 will
be able to read all the records( One condition satisfied) but User1 will
only be able to read the records (Second condition not satisfied).
2. Step 2: So next what we do is we create a permission set say
‘GrantWriteAccess’ and in this permission set we give the object ‘X’ the
Write access and assign the user User1 to this permission set.
(Second condition satisfied).
40. I have two objects Object1 and Object2 which are not related to each other.
Now I want to create a Master-Detail Relationship(MDR) between these objects.
How can I do this?
Answer: Scenario 1: If the two objects are new and there are no records in each.
Then we can create a Master-detail relationship by creating the field in Setup.
Scenario 2: If the two objects exist prior to this requirement and have records. If this
is the scenario then we should first create a lookup relationship between the two
objects and make sure that all the values are filled and then convert the relationship
to master-detail from lookup.
41. The requirement is to delete a set of records and don’t want them to be
stored them in the recycle bin as well. What are my options?
Answer: This can be done using the Hard Delete option. It can be done in the apex
by calling emptyRecycleBin().
42. In the before Insert event trigger which context variable is correct
Trigger.new or new Trigger.newmap?
What is the difference between profile and role? Can a user be assigned two
profiles?
1. System Administrator
2. Standard User
3. Marketing User
4. Solution Manager
5. Read-only
6. Contract Manager
What are the different ways to deploy to production?
1. Change Sets
2. Eclipse with Force.com IDE (Deprecated)
3. Force.com Migration Tool – ANT/Java based
4. Salesforce Package
5. VSCode Salesforce Extension Pack
6. Salesforce Code Builder
52. What is the minimum test coverage required to deploy to production?
Answer: The minimum test coverage required is 75% to deploy to production. If this
is not satisfied then the apex class or trigger cannot be deployed to production.
B. Lightning Based
Answer:
1. Component
2. Controller
3. Helper
4. Style
5. Documentation
6. Renderer
7. SVG
8. Design
54. Name the different lightning component models?
Answer:
Answer:
The lightning app builder is used to create lightning pages for the Salesforce
Lightning experience and mobile apps. The Lightning App Builder is a point-and-click
tool. Lightning Pages are built using Lightning components which are compact,
configurable, and reusable elements that can be dragged and dropped into different
regions of the page in the Lightning App Builder. It is very useful and easy to use.
1. App Page
2. Home Page
3. Record Page
56. Which language does the Lightning component use on the Server side and
Client side?
Answer: Lightning Component uses Javascript on the client side and Apex on the
server side.
Answer:
Answer:
1. Better Performance
2. Out-of-the-box component set
3. Faster development
4. Multiple device and cross-browser compatibility
5. Event-driven architecture
6. Rich component ecosystem
59. Is there a limit to having lightning components in one application?
Answer: A bucket field is a field that helps in categorizing records in a report. It can
be used as any other field to sort, filter or group your report.
Answer: Standard reports are created by Salesforce when we create objects and
relationships. Custom report fields can be specified by the admin. We can also
associate up to 4 objects.
Answer: Dynamic dashboards are used to display details according to the user’s
security settings. It does not refresh on its own. It refreshes when the page is
refreshed. Dynamic dashboards help to show data that is specific to that user and
the data to which he has access.
Answer: Yes formula fields can be used in all the other types of reports except
Tabular. The formula should be in currency, percent, or number type.
Answer:
1. Bucket fields
2. Cross filters
3. The rows display filters.
Answer: Apex triggers allow us to perform custom actions before or after events to
records in Salesforce, such as insertions, updates, or deletions. We use triggers to
perform tasks that can’t be done by other point-and-click tools in Salesforce UI.
There are two types of Triggers:
1. Create a record
2. Update the record
3. Launch a flow
4. Send an email
5. Post to chatter
6. Submit for approval
7. Can do what all a workflow can do except for outbound messages
75. What is a workflow? What actions can be performed using it?
Answer: The approval process is used to provide the user with a step-by-step guide
to approve a certain process. We can configure to send an email, create a task, etc
when the approval process reaches a certain step process. The approval process
consists of the following steps:
1. Process definition
2. Initial submission actions
3. Step definitions
4. Final Rejection actions
5. Final Approval actions
77. What is a recursive trigger and how can we avoid it?
Answer: Recursive trigger is a situation where the actions of the trigger invoke the
same trigger and it goes on in a loop. To avoid this scenario a simple step is to
create a static variable and check the state of the variable before executing the
trigger.
Answer: Simply put the process builder is designed to be a simpler tool. It is much
more linear in the process as compared to Flow builder. Flow builder is much more
powerful not only in terms of the process design but also actions. Flow builder has a
delete functionality along with being able to update multiple records. It is true that
process builders are also able to update multiple records but it is limited to updating
only child records of the parent record which started the process.
79. What are the conditions which need to be specified when we need to
schedule actions?
Answer: Trigger Context variables (TCV) can be defined as those variables which
help us in tracking the runtime information of the current execution of a trigger. Some
of them are:
1. isExecuting: This variable returns the value true if the current context
for the Apex code happens to be a trigger and does not happen to be a
Visualforce page, a Web service, or an execute anonymous() API call.
2. isInsert: This variable returns the value true if the trigger executed is
an insert operation
3. isUpdate: This variable returns the value true if the trigger executed is
an update operation
4. isDelete: This variable returns the value true if the trigger executed is a
delete operation
5. isBefore: This variable returns the value true if the trigger was fired
before any record was saved
6. IsAfter: This variable returns the value true if the trigger was fired after
all record was saved
7. isUndelete: This variable returns the value true if the record was
recovered from recycle bin
8. new: This variable returns the list of the new versions of the sObject
records. This is only available in the insert, update and undelete
triggers.
9. newMap: This returns the list of Ids of the new version of the sObject
records
10. old: This variable returns a list of all the old versions of the sObject
records. This is only available in update triggers and deletes triggers
11. oldMap: This variable returns the list of Ids of the old versions of the
sObject records
12. size: This variable returns the total number of records invoked by the
trigger
82. What is the order of execution of Trigger, Process Builder, and workflow?
Answer: The order of execution is Trigger => Workflow => Process Builder
REST API
SOAP API
Bulk API
Streaming API
Metadata API
Chatter REST API
User Interface API
Analytics REST API
Apex REST API
Apex SOAP API
Tooling API
86. What are webservices?
Answer: JSON (Javascript Object Notation). JSON is lighter than XML. When
transferring data between two communication channels it needs to be in Text, JSON
is text and can be converted to Javascript and vice-versa with ease. JSON is then
used to send messages between servers.
Answer: Test classes are used to write unit tests for Apex classes and triggers in
salesforce. We need to write test classes that have more than 75% code coverage of
the apex class and triggers. When we need to deploy apex classes or triggers in
production we need to upload the test classes along with it. If the test classes fail to
cover 75% of the code then deployment fails.
Answer:
1@isTest
2private class MyTestClass {
3 static testMethod void myTest1() {
4 }
5 static testMethod void myTest2() {
6 }
7}
90. What are assert statements and why are they used?
Answer: Assert statements are used to compare what the real value is and what
the expected value is. There are 3 types of assert statements:
1. system.assertEquals(val1,val2)
2. system.assertNotEquals(val1,val2)
3. system.assertEquals(val1> val2)
91. What is seeAllData?
Answer: The test classes cannot recognize the data in the database by default and
hence we need to mention the @isTest(seeAllData=true) so that it recognised the
data in the database.
1. Single records
2. Bulk records
3. Positive scenarios
4. Negative scenarios
5. Restricted User
6.
Let see the Salesforce platform related interview question and answers:
1. Developer Sandbox
2. Developer Pro Sandbox
3. Partial Copy
4. Full Sandbox
Simply put, cloud computing is a way of accessing services on the internet instead of
on your computer. You can use the cloud to access applications, data, and
development tools from virtually anywhere. Whether you’re working on your phone
from a crowded train in Chicago or on your laptop at a hotel in Hong Kong, you can
access the same information because it all lives online..
3. What is Iaas?
IaaS stands for Infrastructure as a service: A cloud service provider owns and
manages the hardware upon which your software stack runs. That includes servers,
networking, and storage. This can be a great cost-reduction strategy if you’d like to
avoid purchasing and maintaining infrastructure.
In this type of service, you will get the Virtual System that can be connected using
the internet. Where you can install any Software even in some service providers you
can install the operating system.
4. What is PaaS?
PaaS stands for Platform as a service: In this type of service, you get a
development platform bundled with all the types of software preinstalled. You will
then have to write and execute all your codes in a remote server by some
mechanism.
5. What is Saas?
SaaS stands for Software as a service: It offers the most support and is the
simplest of all delivery models for the end user. Chances are that you already use it
in your organization. This is the highest level of service in which everything is
provided from hardware to software to already build applications.
1. Lookup Relationships
2. Master-Detail Relationship
3. Many-to-Many Relationships (Junction Object)
4. Self Relationship
5. External Relationships
6. Hierarchical Relationships
A junction object is a custom object with two master-detail relationships, and it is the
key to making a many-to-many relationship.
Profiles help to control object privileges such as CRED (Create, Read, Edit, Delete).
They also contain system permissions that a user can carry out such as exporting
data. Profile used for object level and Field level access. It is mandatory for all Users
Roles on the other hand help with sharing records across an organization. They
work in a hierarchical fashion, giving users access to records that are owned by
people lower down in the hierarchy. Roles used for Record level access. It is not
mandatory for all Users.
They should be applied to the objects whose org-wide defaults are set to Public
Read-only or Private because sharing rules can only extend the access they cannot
restrict the access provided by Organization-wide defaults.
Owner Based
Criteria Based
The Manual sharing button allows users to share records with others with one button
click. Sometimes we encounter a scenario where individual users want to share their
records with another colleague (user). In that case, manual sharing is the best
option.
There are situations where the business requirement is too complex and standard
sharing rules provided by the Salesforce will not work. In that case we can use the
Apex Sharing.
To access sharing programmatically, you must use the share object associated with
the standard or custom object for which you want to share. For example,
AccountShare is the sharing object for the Account object and for MyCustomObject it
should be like MyCustomObject__Share. Here is sample code.
1. Screen Flow: With Screen Flow you can create a custom UI (user interface)
and guide users through a business process that can be launched from
Lightning Pages, Experience Cloud (previously known as Community Cloud),
quick actions and more.
2. Record-Triggered Flow: This Flow launches when is record is created,
updated, or deleted. So far, we have used Apex triggers for these
automations some of which can now be done using Flows.
3. Scheduled-Triggered Flow: This flow launches at the specified time and
frequency for each record in a batch. Traditionally we have met this kind of
requirement using Apex batch jobs.
4. Platform Event Flow: Launches when a platform event message is received.
For example, you can pump the data from external system in Platform Events
and then use Flows to split and save the records in different objects.
5. Auto launched Flow: Launches when invoked by Apex, Process Builder or
even REST API
Try not to mix Apex, Process Builders, Workflow Rules, and Record-Triggered flows.
In general, you should choose one automation tool per object.
let declarative tools handle non-DML activities like separate DML activity and
email alerts and in-app alerts offload it to Apex
Check out the Apex hour blog post to learn about Best practices for Salesforce Flow.
Let’s see the Salesforce platform Apex interview questions and answers:
One common approach is to separate DML activity and offload it to Apex, and let
declarative tools handle non-DML activities like email alerts and in-app alerts — just
be careful and ensure none of your Apex conflicts.
17. What are Apex Best practices in Salesforce?
Apex code is used to write custom and robust business logic. As with any language,
there are key coding principles and best practices that will help you write efficient,
scalable code. Check our Apex best practices of Salesforce.
18. What is Apex Trigger? and When we should use Apex Trigger?
There lots of automation tool available in Salesforce. Lets understand the when to
use Apex Trigger in Salesforce.
Check this blog post to learn about which all trigger patterns are available in
Salesforce. For Trigger Handler code check this post.
20. What is Apex Trigger Framework? What are different Trigger Framework
are available in Salesforce?
How many trigger frameworks are available in Salesforce, which one is a lightweight
apex trigger framework and a Comparison of different approaches? Check our Apex
hours Trigger Framework in Salesforce sessions.
21. What is Async Apex in Salesforce? How many ways do we have for Async
processing?
Batch class is used to process millions of records with in normal processing limits.
With Batch Apex, we can process records asynchronously to stay within platform
limits. If you have a lot of records to process, for example, data cleansing or
archiving, Batch Apex is probably your best solution. In Batch Apex each transaction
starts with a new set of governor limits, making it easier to ensure that your code
stays within the governor execution limits
23. What is the difference between the Stateful and Stateless batch jobs?
If your batch process needs information that is shared across transactions, one
approach is to make the Batch Apex class itself stateful by implementing
the Stateful interface. This instructs Force.com to preserve the values of your static
and instance variables between transactions.
A Mixed DML operation error occurs when you try to persist in the same
transaction and change to a Setup Object and a non-Setup Object. For
example, if you try to update an Account record and a User record at the same time.
Use Lightning Data Service to load, create, edit, or delete a record in your
component without requiring Apex code. Lightning Data Service handles sharing
rules and field-level security for you. In addition to simplifying access to Salesforce
data, Lightning Data Service improves performance and user interface consistency
Learn about Event in LWC in our Events in Lightning web components post. Events
are used in LWC for components communication. There are typically 3 approaches
for communication between the components using events.
27. How to call Apex class in Lightning web component and how many way we
have and when to use which option?
You can call the apex methods as functions into the component by calling either via
the wire service or imperatively. To call an Apex method, a Lightning web component
can:
Wire a property
Wire a function
Call a method imperatively
To expose an Apex method to a Lightning web component, the method must be
static and either global or public. Annotate the method with @AuraEnabled
Learn more from the Call apex method from the Lightning web components post.
28. What are the basic difference between Application Event and Component
Event in Aura component?
30. What is lazy loading in LWC and how do lazy loading in LWC?
Learn how to use lazy load in the lightning web component here.
Here is a list of the most frequently asked Salesforce Integration question in the
Developer Interview.
34. What is the difference between Enterprise WSDL and Partner WSDL?
Changes if custom field or custom Does not changes if custom field or custom
objects are added to your objects are added to an organization’
organization Salesforce configuration
1. What is Integration?
2. What is webservices?
Here is some difference between JSON and XML. Check this post for more detail.
JSON XML
JavaScript Object
Notation has a type like Extensible markup language is type less, and should be
String, number, Object, string
Boolean
Guidelines: Key –
Enclosed in double Guidelines: Element – <lastname>hours</lastname>
Quotes(String) Value – Element Definition:
Can be any datatype {} – <xs:element name=”lastname” type=”xs:string”/> Attribute –
Object [] – Array , – <lastname lang=”EN”>Smith</lastname> Attribute Definition –
Separates data element <xs:attribute name=”lang” type=”xs:string”/>
within Object
RESTful API is an interface that two computer systems use to exchange information
securely over the internet. REST API has a lightweight request and response
framework. It is a simple, easy-to-use, and powerful web service based on RESTful
principles. REST API supports both XML and JSON. Rest resource is referenced
using URI, abstraction of information, and access using HTTP methods.
SOAP is the Simple Object Access Protocol, a messaging standard defined by the
World Wide Web Consortium and its member editors. SOAP uses an XML data
format to declare its request and response messages, relying on XML Schema and
other technologies to enforce the structure of its payloads.
There are lots of Integration option are available in Salesforce. Some of the are
below.
Data
API Name Protocol Communication
Format
JSON,
REST API REST Synchronous
XML
Analytics JSON,
REST Synchronous
REST API XML
CSV,
It’s Asynchronous. Handle large data
Bulk API REST JSON,
loads with batching.
XML
JSON,
Apex REST
REST XML, Synchronous
API
Custom
Apex SOAP
SOAP (WSDL) XML Synchronous
API
Build custom
development tools
Tooling API for Salesforce
platform
applications
8. What is WSDL?
Enterprise WSDL
Partner WSDL
SOAP UI is a very popular API testing tool especially when we talk about SOAP
APIs. So, in this tutorial, we’re going to see how we can connect with Salesforce Org
using SOAP UI and we will call a standard salesforce soap API and have a look at
the response. Check below recording how to test Salesforce webservice using
SoapUI.
When you implement Salesforce, you frequently need to integrate it with other
applications. Although each integration scenario is unique, there are common
requirements and issues that developers must resolve.
Check our blog post Salesforce integration Patterns & Best Practices to learn more.
Pattern Scenario
Data Virtualization Salesforce accesses external data in real time. This removes the
need to persist data in Salesforce and then reconcile the data
between Salesforce and the external system.
Remote site settings is used to authorize the endpoint and allow us to whom
integrate(end user)
OAuth is short for open authorization. OAuth 2.0 is a framework that allows for a
secure way for systems to establish trust with one another. The end goal is to obtain
an access token that can be used by to access protected resources without ever
providing your username or password to the other system.
JWT Structure
1. Headers – Which contains the algorithm which will be used to sign the
request {"alg":"RS256"}
2. Payload – This contains claims information which is an object containing
information about user and additional data. Claims are set using
parameters- {"Iss,aud,sub,exp"}
3. Signature – Signature consists of 3 parts and the structure is given below
<headerbase64encodedurl>.<claimsbase64encodedclaims>.<signature(uses
algorithm like RS 256)>
Allows apps with a secure client server (one which can protect a secret or private
key) to access protected resources. This flow is mainly used by applications
hosted on web server. If external application is trusted one and hosted on secure
server and can securely store client_secret, then flow can be used. This flow is used
mainly to build web application.
Learn more from Authorisation Code With Secret (Web Server flow).
A named credential specifies the URL of a callout endpoint and its required
authentication parameters in one definition. To simplify the setup of
authenticated callouts, specify a named credential as the callout endpoint.
OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol. It allows
Clients to verify the identity of the End-User based on the authentication performed
by an Authorization Server, as well as to obtain basic profile information about the
End-User. Learn more here.
Getting access to user data in other Making your accounts available in other
systems systems
This is primarily used for Authorization This is primarily used for Authentication
22. What is Streaming API? Explain the different mechanisms of Steaming API.
Streaming API enables the streaming of events using push technology and provides
a subscription mechanism for receiving events in near real-time. The Streaming API
subscription mechanism supports multiple types of events, including PushTopic
events, generic events, platform events, and Change Data Capture events
Term Description
A Salesforce entity that represents the definition of the custom data that
Platform you send in a platform event message. You create a platform event and
Event define its fields in Salesforce. The subscription channel is based on the
platform event name.
Change Data Capture is a streaming product on the Lightning Platform that enables
you to efficiently integrate your Salesforce data with external systems. With Change
Data Capture, you can receive changes of Salesforce records in real-time and
synchronize corresponding records in an external data store. Change Data Capture
publishes events for changes in Salesforce records corresponding to create, update,
delete, and undelete operations.
24. What is Tooling API? Give one example of when you used it.
Use Tooling API to build custom development tools or apps for Lightning Platform
applications. Tooling API’s SOQL capabilities for many metadata types allow you to
retrieve smaller pieces of metadata. Smaller retrieves improve performance, which
makes Tooling API a better fit for developing interactive applications. Tooling API
provides SOAP and REST interfaces.
Salesforce Connect is a powerful App Cloud integration service, which enables users
of Salesforce applications to seamlessly access and handle data stored in external
sources, without leaving the Salesforce native environment. Instead of copying the
data into your org, you can use external objects to access the data in real time via
web service callouts.
let us see what is composite resources. We have seen standard Salesforce rest
APIs which we use to create or update data in salesforce from an external system
these API‘s we do one at a time. Composite resources is an enhanced form of rest
API which executes a series of rest API requests in a single call. It helps you to do
multiple operations like read create update and delete Salesforce data in a single
callout
An API gateway is a management tool that sits at the edge of a system between a
consumer and a collection of backend services and acts as a single point of
entry for a defined group of APIs. The consumer can be an end-user application or
device, such as a single page web application or a mobile app, or another internal
system, or third-party application or system. Below diagram shows how an API
gateway often sits between the public internet and the demilitarized zone (DMZ) of a
private network.
1. Transnationality
2. Event handling
3. Queuing and buffering
4. Extract, transform, and load
5. Translation and transformation
6. Mediation routing
Apex Triggers
Use the Trigger class to access run-time context information in a trigger, such
as the type of trigger or the list of sObject records that the trigger operates on.
An Apex trigger is a set of the statement which can be executed on the following
events. We can add the below events with comma-separated. Here is a list of trigger
events in Salesforce.
Trigger Events
Use Salesforce flow for most of the automation in salesforce and use Apex Trigger
for complex logic which can’t be done using Flow.
Here is a list of all apex trigger best practices that we should while creating the
trigger in Salesforce.
Check out our Order of execution in the Salesforce post on the same.
10. When you will choose before the event and when you will choose after the
event?
Use before the event to update the record which executes the Apex Trigger. Use
After the event to use related or child records.
Trigger.New return the list of SObject which invoke the trigger. Trigger.newMap
return the Map of Id and SObject.
It is always good and recommended to check the old and new values before making
any updates in Trigger. You can use Trigger.Old to check the old value of the record.
It can help you to stop recursion in Trigger.
1. Use Static Boolean Variable: Create a class with a static Boolean variable
with a default value of true.
o This is good for less than 200 records.
o If we update 200+ records then it will only process the first set of
records and skip the others.
2. Use Static Set to Store Record Id: Use static set in class to store all
processed record IDs.
Batch Apex can be invoked using an Apex trigger. But the trigger should not add
more batch jobs than the limit
Please check this post to learn about Handler pattern and code. Let us talk about
what is the advantage of Trigger Handler Patter.
Check out the apex hours Trigger Framework in the Salesforce session for the
same.
Validation rules are used to confirm that the data entered into a record meet various
data quality/business rules before letting the user save it. Triggers can be used for
various different things and can be executed at different times – e.g. when initiating a
new record, before saving it, or when a record is deleted. Validation rules are very
easy to create and virtually anyone can learn how to create these. Triggers are
more complex and generally require some development skills.