Before you go!

Take this "Salesforce Interview Questions" interview guide with you

Welcome to Interviewbit, help us create the best experience for you!

Currently, You are a:

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your education

College/University *
Enter the name of your college
Branch *
Year of completion *

Few details about your career...

Current Company *
Enter company name
Experience *

You're all set!

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

Salesforce Interview Questions

Download PDF


Your requested download is ready!
Click here to download.

Begin your success journey!

Sign Up using
Full name *
Email *
Password *

By creating an account, I acknowledge that I have read and agree to InterviewBit’s Terms and Privacy Policy .

Welcome back!

Log In using
Email *
Password *

Salesforce is a Customer Relationship Management(CRM) platform that uses cloud technology to bring companies and customers together. It helps businesses to manage their customer’s data, track their activities efficiently. It supports powerful, connected products for improving your marketing, sales, commerce, service, IT, and more. Salesforce CRM does not need any technical knowledge to set up and manage the same.

CRM

Scope of Salesforce

Salesforce is a preferred career option if you are looking forward to CRM. A lot of companies like Accenture, Adidas, Atlas, Cisco, Deloitte, Godrej, Infosys, etc. are making use of Salesforce. Those who opted for Salesforce are enjoying a high scale of pay and extreme job satisfaction.

As the number of Salesforce platform end-users increases, companies face a lack of proficient skill sets about Salesforce. They want Salesforce proficient people who know the platform very well and can use its several services for business needs. Hence, Salesforce professional count is increasing day by day.

Crack your next tech interview with confidence!
Take a free mock interview, get instant⚡️ feedback and recommendation💡

Salesforce Interview Questions For Freshers

1. What are the features of Salesforce

Contact management

  • It provides easier contact management by giving access to critical data of the customers and interaction history.
  • It gives complete customer details including insights and engage-enhancement strategies. Social data of the customers can be used for a deeper understanding of their particular behavior regarding any product or service.

Opportunity management

  • Salesforce provides an opportunity to view the activity timeline of your customers. It represents different stages of a particular deal which helps you to decide your next move.
  • You can see critical details of the activity timeline in addition to the business competitors. The readymade templates ensure hassle-free emailing to the clients.

Quote management

  • Quote management of the products will have tracking of the products, which are part of your deal and it includes the standard price, product code, quantity, and quoted price. Also, you can establish quantity along with revenue schedule and it reflects the delivery terms and payment.
  • Salesforce CRM app is having a built-in quoting mechanism that automatically quotes client data. It also creates an approved template PDF and sends it directly to the customer as an email.

Lead management

  • Lead management is featured with an affluent activity timeline. It provides an access to up-to-date contacts on the timeline. Also, it makes use of the sales paths to understand the related documents.
  • CRM app functions as a fast lead converter machine, which informs you about the original source of the leads. Automatic emailing boosts your revenue-generating mechanism.

Sales data

  • Using Salesforce CRM you can get the right sales data at the right time. It provides a faster connection with key decision-makers.
  • You can easily plan territories. It can be used for increasing sales and marketing productivity with the latest and most accurate data.

Mobility

  • The Salesforce mobile app turns your mobile device into a portable sales office by allowing the users to access CRM data at any time and from anywhere.
  • You can log calls, work opportunities, check dashboards, respond to hot leads, etc.

Workflow and approvals

  • It allows to use of visual workflow to rapidly design and automate any of the business processes with drag and drop simplicity. And you can successfully manage flexible approvals processes for deal discounts, expenses, and more.

File sync and share

  • It’s easier to share files, discuss them, publish the best and track your content in real-time by using Salesforce.
  • You can quickly find what you are looking for, share it securely, and also subscribe to receive alerts when something changes.

Dynamic dashboards and custom reports

  • Dashboards offer a real-time picture of how your business is performing in the market. Users can recognize market trends, calculate the activities and clear up the quantities. You can build your own dashboard by using drag and drop icons in Salesforce CRM.
  • It allows creating your own customized sales forecasting report with Salesforce CRM. By using a simple drag and drop feature, users are able to adjust the fields and view data with filters. Charts provide real-time data to give you the latest insight.

Sales forecasting

  • It tracks the journey of the leads in the pipeline to look into whether they are reaching their destination i.e. deals or not. It gives brilliant forecasting on sales upon analyzing the same. You can apply your right judgment to the forecasted amount and according to that, you can plan your strategies.
  • You can make use of in-line editing, multicurrency support, override visibility, etc. to stay on top of your business.
  • It gives the right credit to the right person and permits them to see the forecast as per overlays.

2. What is an object in Salesforce?

In Salesforce, objects are database tables that are used to store the data of an organization. There are two types of objects in Salesforce. They are:

  • Standard object: These are the objects provided by the Salesforce platform, which includes contacts, accounts, cases, campaigns, opportunities, leads, products, contracts, reports, dashboards, etc.
  • Custom object: They are objects created by developers based on the business process. It stores the important and unique information of an organization. It gives a structure for data sharing. The custom object includes page layouts, custom fields, relationship to other objects, custom user interface tab, etc.

3. What is meant by an App in Salesforce?

An App in Salesforce is a logical container that holds various details related to the company such as a logo, name, business operations, etc. You can customize apps to match your needs, or you can develop new applications by combining custom and standard tabs.

The process to create an app in Salesforce is given below:

Setup —> build—> Create—> App—> Click on new.

By following the above procedure, you can develop an application as you want.

You can download a PDF version of Salesforce Interview Questions.

Download PDF


Your requested download is ready!
Click here to download.

4. Explain different types of apps we can use in Salesforce.

There are two types of apps that we can create in Salesforce. They are:

  • Custom app: They are mainly used by business owners who want to build an app that suits their business requirements from time to time. It’s widely used in the market.
  • Console app: It can be used only in the client service business, where we focus on tackling the client’s issues. Compared to a custom app it’s not widely used in the market.

5. What is sharing rule?

Sharing rules are applied when a user wishes to permit access to other users like public groups, roles, or territories. It gives greater access to particular users by making automatic exceptions to your organization-wide sharing settings. You can define total sharing rules up to 300 for a particular object, including criteria-based or guest user sharing rules up to 50, if available for the object.

6. What is an Audit trail in Salesforce?

An Audit trail in Salesforce is a unique feature that helps in tracking the changes made in the organization by you and other administrators. In that way, you will always get to know who has modified the project at the last minute. It is helpful for the organization with more administrators.

By using an audit trail, you can get to know the details about changes made, the date and time of the change, and the username of the team member who made the changes.

7. What is the difference between role and profile?

The main difference between role and profile is given below -

Role Profile
The role helps in defining data visibility for a particular user. A profile sets the limitation for what an user can do in the organization.
Based on the hierarchy, a role defines which user data a user can see. Profile defines permissions
Defining role to a user is mandatory Defining profile is not mandatory
Roles provide a feature to control access to records by impacting reports. For example,“My Teams” filter. Roles function if a security model (OWDs) of an organization is set to private. Profiles help to decide record privileges i.e. assuming the user can observe the record, it concludes what the user can function, edit, delete, view on that record. It controls other system privileges like export data, mass email, etc.

8. What is a profile in Salesforce? Can two users have the same profile?

The profile in Salesforce is defined as a collection of settings and permissions that define what a user can do in Salesforce. So it gives you the authority to access certain records in Salesforce. There are multiple profiles available in Salesforce. For example, a sales profile can have access to leads, contacts, campaigns, opportunities, etc.

The people who work under one department may be assigned the same profiles. Consider the case of sales profile, many people work under it and each person who works under this is assigned with the same profile. Hence we can say that any number of people can have the same profile.

9. What is a Master–Detail relationship in Salesforce?

  • Master-Detail relationship is a relationship between a parent and child where the master represents the parent and the detail represents a child. This relationship can be used when we want to control the display of detail records based on the value present in the master record.
  • The master object completely takes control of the behavior of the Detail object. The survival of the child is dependent on the parent, because if the parent gets deleted then the child automatically gets deleted. You can create Roll-up summary fields in master records which will calculate the SUM, AVG, and MIN of the child records.
  • Consider an example of a courier company model, where a delivery schedule is always linked to a delivery location. If we delete a delivery location from our list, then all the related delivery schedules should also be removed. Such a dependency can be achieved only through a Master-Detail relationship.

10. What is dashboard in Salesforce?

A dashboard in Salesforce is a pictorial representation of the report. It displays data from source reports as visual components. These components provide a snapshot of key metrics and performance indicators of the organization at a single glance. A single dashboard is capable of displaying 20 reports at a time.

11. What do you understand by workflow in Salesforce?

  • Workflow in Salesforce allows you to automate standard internal procedures and processes for saving time across your organization. It helps to evaluate records as they are created or updated and determines if an automated action needs to occur.
  • Automation functions in Salesforce include the functions such as sending follow-up emails, tracking the customer map journey, performing other marketing activities to boost the sales of the company, etc.
  • A workflow rule is a major container for a set of workflow instructions. These instructions are usually summed up in an if/then statement. Workflow rules are divided into two main components. They are:
    • Criteria: The “if” part of the “if/then” statement i.e., what must be true of the record for the workflow rule to execute the related actions.
    • Actions: The “then” part of the “if/then” statement i.e., what to do when the record meets the criteria.
  • Consider an example for a workflow, “if it is raining, then bring an umbrella”. In this example, the criteria are “it is raining” and the action is “bring an umbrella”. If the criteria aren’t met, then the action isn’t executed. The workflow rule’s actions are executed only when a record meets all the criteria of a workflow rule.
Workflow In Salesforce 

12. What are the benefits of using Salesforce CRM?

The benefits of using Salesforce CRM is given below:

  • Communicate using automation tools: With the help of Salesforce Einstein Bots, its features can automatically respond to chats on time. Thus avoids giving delayed response.
  • Data syncing from different applications: Data from other applications such as MailChimp and G Suite can be integrated into the Salesforce platform. This removes the difficulty of moving from one software to another. Using Salesforce mobile app, you can keep track of your data anytime and anywhere.
  • Utilization of data analytics tools: Salesforce’s Einstein Analytics gives insights so that users can address the changing data right away. Salesforce has a collection of reporting tools and dashboards that will help you collect information and work on it properly.
  • Following customer activity: It helps to understand the customer’s journey through the sales cloud so that you will have easier access to their behavior and background. You can review the click rates on your email campaigns to help you recognize what works best for your customers.
  • Assisting customers through chat: A chat box is provided by the service cloud’s live agent depending on the interaction of your customers or followers on your web page. By connecting with the customer profile, your service team can deliver answers. This is helpful in improving customer experiences by letting agents respond quickly.
  • Using an omnichannel feature: Multi-channel feature provided by the service cloud automatically shifts conversations from various channels directly to the agents. This gives them one place to connect with customers through calls, social media, chat, messaging, or email.
  • Consistent engagement with current customers: Looking for a new customer is more expensive than keeping the current ones. Use the gathered data in Salesforce’s CRM to create consistent marketing campaigns.
  • You can build apps: Force.com, a Platform as a Service(PaaS) simplifies customizing and building apps for any device without using a complicated infrastructure.

13. What is trigger in Salesforce?

The trigger is defined as an Apex code that executes to perform custom actions, before or after modifications like insert, update, delete, etc. that has done to records in Salesforce.

Triggers can be defined for top-level standard objects, like contact or account, custom objects, and few standard child objects. They are active by default when created. When the specified database events occur, Salesforce automatically fires active triggers.

The syntax for creating a trigger is given below:

trigger TriggerName on ObjectName (trigger_events)
{
   code_block
}

To execute a trigger before or after insert, update, delete and undelete operations, specify multiple trigger events like before insert, before delete, after insert, after update etc. in a comma-separated list.

Trigger in Salesforce

14. What is the difference between static and dynamic dashboards in Salesforce?

Static dashboards Dynamic dashboards
These are the default dashboards that are visible to any user Dynamic dashboards show data tailored for a specific user
It is used to show organizational-wide data to a set of users It is used to show a single user’s specific data, such as the number of sales closed, leads converted, etc
It can be scheduled to automatically refresh its data We can’t schedule dynamic dashboard because when the dashboard is opened by us, it will display the real-time generated data

15. What is Apex in Salesforce?

  • Apex is a strongly typed and object-oriented programming language that permits developers to execute flow and transaction control statements on Salesforce platform servers in conjunction with calls to the API. It uses syntax that looks similar to Java and pretends like database stored procedures.
  • Apex allows developers to add business logic to many system events, including Visualforce pages, button clicks, and related record updates. This code can be initiated by requests from web services and from triggers on objects.
  • All Apex code runs completely on-demand on the Lightning platform. Apex code is written and saved to the platform by developers. Through the user interface, end-users trigger the execution of Apex code.

Salesforce Intermediate Interview Questions

16. What are Governor limits in Salesforce?

  • Governor limits control how much data a shared database can store. They help to make sure that no one monopolizes the shared resources like storage, CPU, and memory. Whenever the Apex code exceeds the limit, it issues a runtime exception that cannot be handled.
  • The following list gives some of the governor limits in Salesforce:
    • Push notification limits
    • Per-Transaction Apex limits
    • Size-Specific Apex limits
    • Miscellaneous Apex limits
    • Static Apex limits
    • Email limits
  • Examples of governor limits in Salesforce:
    • The total number of sendEmail methods permitted is 10.
    • The total number of records retrieved by a SOQL query is 50,000.
    • Maximum CPU time on the Salesforce servers is 10,000ms on synchronous Apex.
    • The total number of callouts(web services calls or HTTP requests) in a transaction is 100.

17. What is junction object in Salesforce?

Junction objects are useful in building many-to-many relationships between objects in Salesforce.

Consider an example of recruiting application, where a position for a job is linked to many candidates or a candidate can apply for many other jobs. Here, a third-party object “job application” is referred to as a junction object in order to connect the data model. In the above-given example, “job application” is the junction object.

Junction Object in Salesforce

18. What are Permission sets?

A Permission Set is a collection of settings or permissions that is used to give access to numerous tools and functions for the user. You can use permission sets for different types of users to extend functional access without changing their profiles. Instead of creating a separate profile each time, you could easily create a Permission Set.

19. What are the different types of reports available in Salesforce?

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.

There are four types of reports in Salesforce. They are as follows:

  • Matrix report
    • 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.
    • Example: Summarize opportunities by account horizontally and by month vertically.
  • Summary report
    • 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.
    • Example: All opportunities for your team subtotaled by owner and sales stage.
  • Tabular report
    • 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.
    • Example: These reports are used to list all accounts, list of opportunities, list of contacts, etc.
  • Joined report
    • 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.
    • Example: You can develop a report to display opportunity, case, and activity data for your accounts.
Reports Available in Salesforce

20. Explain the Force.com platform

Force.com is the entire framework and codebase on which the whole Salesforce application exists. We can also say that Salesforce is built on Force.com, which is a Platform as a Service (PaaS) that allows us to simplify the design, development, and deployment of cloud-based applications and websites. Developers can work with Cloud Integrated Development Environment (Cloud IDE) and deploy the applications on the servers of Force.com.

21. Explain different components of dashboard available in Salesforce.

Some of Salesforce dashboard components are explained below:

  • Gauge: It is used for displaying a single value within a custom value range.
  • Metric: This is used for showing a single pair of key–values. We can enter the metric label directly on the components by clicking the empty text field next to the grand total. All metrics placed in the dashboard column would be displayed as a single component.
  • Table: Tables are used for showing report data in the form of lists. For example, top five or bottom five opportunities.
  • Visualforce page: It is used for forming a custom component as a dashboard or displaying information that is not available in other component types.
  • Charts: It is used for showing comparisons. Charts are divided into 6 types. They are line Chart, vertical bar chart, horizontal bar chart, donut, pie, and funnel.

22. What are validation rules in Salesforce?

  • Validation rules in Salesforce consist of a formula or expressions that evaluate the data in one or more fields in a record to meet the standards you specify before the user can save the record. It returns a “True” or “False” value based on the evaluation of the data. Validation rules are responsible for displaying an error message to the user when the condition is “True” due to an invalid value.
  • Validation rules are helpful in enforcing integrity constraints against the data. Here we give conditions in the formula editor. If one validation rule fails, Salesforce proceeds to check another validation rule held within the field or record and shows an appropriate error message at that particular field or above the record.
  • You are allowed to create validation rules for fields, objects, campaign members, or case milestones. For example, we can create a validation rule that fires when a user tries to save an account with the incorrect length for the account number.

23. What causes data loss in Salesforce?

There are many things that cause data loss in Salesforce. They are:

Human error:

  • When editing an object definition (incorrectly changing a picklist), importing data (overwriting good data with bad), or merging households are the common situations where human error may occur.
  • For example, when you import data, it becomes important to match up fields. Situations like moving to percent, number, and money from other data types or changing text area to URL, email, phone or text, etc. will lead to incorrect match in fields. If you are updating a large number of records and match up incorrect fields, your records will be invalid.

Accidental deletion of Salesforce data:

  • A record (or multiple records) might be accidentally deleted by users or employees. Deleting records could be because of miscommunication, forgetting to remove a contact from being deleted, and many other reasons. So proper training and having a trusted backup/recovery solution are much important.

Purposeful deletion of Salesforce data:

  • Disgruntled employees like the person who has recently got a very bad performance review and thinks their job is at stake or who is jealous of other employees might try to delete the data. A few clicks on the delete button may lead to the deletion of multiple records from Salesforce.
  • If they empty their recycle bin, that data recovery will be difficult using the Weekly Export. It can cause numerous damages if these records are not backed up properly.

Data sync errors:

  • If you have more than one admin or use Outlook for Salesforce, you might experience a data sync error at some point.
  • For example, one admin is trying to refresh a sandbox while another admin is working from home and trying to edit an object type in that same sandbox. When this happens, the admin who was editing the object can lose his work in progress.
  • Contacts in Outlook can over-write good Salesforce data when using Outlook for Salesforce, introducing errors through inappropriate sync.

24. What is Visualforce in Force.com?

  • Visualforce can be defined as the UI for the Force.com platform that allows developers to build sophisticated, custom user interfaces which can be hosted natively on the Lightning platform.
  • This Visualforce framework includes a tag-based markup language, a set of server-side “standard controllers” that forms basic database operations(such as queries and saves) and each Visualforce tag corresponds to a user interface components such as a field, section of a page, or a related list, etc.
  • It works on the standard MVC model. It can have strong integration with the database and deploy auto-generated controllers for database objects. The behavior of Visualforce components can be controlled by the developer, by utilizing the same logic that was used in standard Salesforce pages. It is also possible for a developer to associate their own logic with a controller class written in Apex code.

25. What are the differences between trigger and workflow in Salesforce?

Workflow Trigger
Workflow is an automated process that fires an action depending on evaluation criteria and rule criteria A trigger is a piece of program code that will be executed before or after a record has been inserted or updated
We cannot carry out DML operations on workflow  We can use 20 DML operations in a single trigger
We are able to obtain a workflow across the object We are able to access the trigger across the object and associated with that objects
We cannot query from database in workflow We can use 20 SOQL(Salesforce Object Query Language) from the database in a single trigger

26. What are record types in Salesforce?

  • Salesforce record types permit us to associate different business processes and display different picklist values and page layouts to different users based on the user profile.
  • Administrators are having the ability to associate record types with the user profiles so that, in the record’s detail page, different users will be able to see different picklist values and page layouts.
  • For example, consider a case where record types are most often used i.e., to create two different sales processes on the Opportunity object. Each of them with different sales stages and page layouts. This will indicate that with record types you will be able to apply multiple page layouts per object as well as per user profile.
  • Benefits of record types:
    • It modifies user interaction experience to specific needs of the business.
    • Allows for administration in a simple manner as there are fewer fields to maintain.

27. What are page layouts related to Salesforce?

  • Page layouts are used to control the layout and organization of buttons, fields, Visualforce, custom links, s-controls, and related lists on object record pages.
  • They are helpful in organizing user interface pages by determining which fields, related lists, and custom links are required, read-only, and visible for the user.
  • We can create many page layouts and apply them to different user groups, with the aim of creating a customized experience. For example, you could have a single account record like ACME Corp., but it displays different information depending on your user profile.
  • Here, you can only apply the one-page layout to a single group of users per object, per record type. For example, if you have one record type based on the Accounts object, you can apply only one-page layout per profile.

28. What are the two types of triggers in Salesforce?

Below are the two types of Apex triggers in Salesforce:

Before triggers: It can be used to update or validate record values before it is saved to the database.

trigger TriggerName on ObjectName(before event) //Here event can be insert, update or delete
{
    code_block
}

After triggers: It can be used to access field values of the records that are set by the system (such as record’s ID or LastModifiedDate field) that are stored in the database and use this field value to do the changes in other records. Records that fire after the triggers are read-only.

trigger TriggerName on ObjectName(after event) //Here event can be insert, update or delete
{
    code_block
}

29. What is fiscal year or economical year in Salesforce?

The fiscal year or economical year is defined as the period of time used for calculating annual financial statements based on starting and ending date of a company’s financial year. In this period of time, whatever the amount of business that Salesforce has done can be considered as fiscal year and depicts the Salesforce revenue.

There are two types of fiscal years in Salesforce. They are:

  • Normal or standard fiscal year: It is a period that allows estimating by following the Gregorian calendar year that has a 12-month structure. Starting of the fiscal year can begin with the very first day of any month you choose belonging to a particular year. For example, for the fiscal year starting in April, the standard fiscal year is used.
  • Custom fiscal year: It is mainly defined for the companies that lay their forecast based on weekly or quarterly financial planning and can also customize the same. For example, you may have 4 quarters with 13 weeks per quarter in a 4-4-5 pattern or 13 periods per year.

30. Explain skinny table. What are the considerations for skinny table?

Skinny tables in Salesforce are useful in accessing the fields which are frequently used and to avoid joins. This can improve the performance of certain read-only operations such as reports, list views, etc. Skinny tables are highly effective because skinny tables will be in sync with source tables even when the source tables are modified. 

You need to contact Salesforce customer support if you want to use skinny tables. You cannot create, access, or modify skinny tables yourself. For example, you need to contact Salesforce to update your skinny table definition if you want to add new fields.

Considerations for skinny tables are:

  • It can contain an utmost of 100 columns.
  • It cannot hold fields from other objects.
  • For full sandboxes, these skinny tables are copied to your full sandbox organizations. For other types of sandboxes, skinny tables are not copied into your sandbox organizations. To have production skinny tables to be activated, contact Salesforce customer support.

The below figure displays an Account view, a corresponding database table along with a skinny table that can speed up account queries.

Skinny Table

Salesforce Interview Questions for Experienced Developer

31. What do you mean by a sandbox in Salesforce?

A sandbox is a copy of the production environment/ organization and it is used for the purpose of testing and development. It’s very useful because sandboxes are completely isolated from your Salesforce production organization, so it allows you to test out new ideas on the duplicate database without disturbing the original production environment.

You can use the sandbox whenever you want to test a newly formed Force.com application or Visualforce page. Instead of testing it directly in production, you can develop and test it in the sandbox organization. Using this, you can develop the application without any difficulty and then migrate the metadata and data to the production environment. Doing this in a non-production environment permits developers to freely test and experiment with the newly created applications.

There are four types of sandboxes in Salesforce:

Developer sandbox:

  • It is a copy of the production organization, it copies all the information of an application and configuration to the sandbox. It is mainly used for the development and testing task in an isolated environment.
  • This type of sandboxes has limitations of up to 200MB of test or sample data. You can refresh a developer sandbox once a day.

Developer pro sandbox:

  • It copies all of your organization’s reports, dashboards, apps, price books, products, and customizations under setup. But it excludes all of your organization’s custom and standard object records, attachments, and documents.
  • This type of sandboxes has limitations of up to 1GB of test or sample data. We can refresh developer pro sandboxes once a day.

Partial data sandbox:

  • A partial data sandbox is a developer sandbox plus the data you define in a sandbox template, which is intended to be used only as a testing environment. It includes the reports, dashboards, price books, applications, products, and customizations under the setup (including all of your metadata).
  • Additionally, these sandboxes can have your organization’s custom and standard object records, documents, and attachments up to 5 GB of data along with a maximum of 10,000 records per chosen object.
  • A partial data sandbox is smaller compared to a full sandbox and has a shorter refresh interval. You can refresh partial data sandboxes every 5 days.
  • Sandbox templates permit you to select specific data and objects to copy to your sandbox, thus you can control the size as well as the content of each sandbox. Sandbox templates are available only for partial data or full sandboxes.

Full sandbox:

  • It is a replica of production including custom and standard object records, attachments, and documents and is used only as a testing environment.
  • You can refresh full copy sandboxes every 29 days.
Sandbox in Salesforce

32. Explain the various types of object relationships in Salesforce.

An object relationship in Salesforce can be defined as a two-way link or association between two or more objects. Relationships are created by generating custom relationship fields on an object. Due to this, whenever a user views the records, they are also able to see and access related data. The various types of object relationships in Salesforce are:

Master-Detail relationship (1:n):

  • It is a parent-child relationship where the master object controls the behavior of dependent detail and sub-detail object. It is a 1:n relationship, in which there is only one parent, but multiple children.
  • The master field cannot be empty, since it is the controlling object. If a master object’s record or field gets deleted, the corresponding record or fields in the dependent object will also be deleted. This is called a cascade delete. Child object fields will inherit the owner, sharing, and security settings from the parent object. You can create Master-Detail relationships between two custom objects, or between a standard object and custom object until the standard object remains as a master in the relationship.
  • For example, you can define a Master-Detail relationship with two objects such as Account—Expense report. It expands the relationship to sub detail records, such as Account—Expense report—Expense line item. You will be then allowed to perform operations across the master—detail—sub detail relationship.

Lookup relationship (1:n):

  • These relationships are useful for creating a link between two objects, without the dependency on the parent object. This is again a form of parent-child relationship where there is only a single parent, but multiple children exist (1:n relationship).
  • Despite master being the controlling field, deleting a master record will not automatically delete the lookup field in the child object. So the records in the child object will not get affected and there will not be any cascade delete here. Child fields will not inherit the owner, sharing, or security settings of its parent.
  • With a lookup relationship, you are permitted to link two different objects or link an object with itself (except for the user object). For example, you may want to link a custom object “Bug” with itself for showing how two different bugs are related to the same problem.

Junction relationship (Many-To-Many):

  • You can use this kind of relationship whenever you want to create two Master-Detail relationships. By linking 3 custom objects, we can create two Master-Detail relationships. In this, two objects will be represented as master objects and the third object will act as a dependent on both of them. In simpler words, we can say that there will be a child object for both master objects.
  • This relationship allows every record of one object to be linked with several records of another object and vice versa. For example, you can create a custom object “Bug” that relates to a standard object in such a way that a bug can be related to multiple causes, and also a single case can be related to multiple bugs.

Hierarchical relationship:

  • This is a special lookup relationship, that is available only for the user object.
  • It allows users to use a lookup field to associate a single user with another user that does not refer to itself in a direct or indirect way. For example, to store the direct manager of each user, you are allowed to create a custom hierarchical relationship field.

External lookup relationship:

  • This relationship links a child's standard, custom, or external object to a master external object.
  • In this relationship, the standard External ID field values on the parent external object are matched against the external lookup relationship field values of the child object.

Indirect lookup relationship:

  • This relationship links a child's external object to a master standard or custom object.
  • For matching and associating the records, you will mention the parent object field and the child object field when you create an indirect lookup relationship field on an external object. Here, you have to select the parent object’s custom unique, external ID field to match against the child object’s indirect lookup relationship field.
Relationships in Salesforce

33. How many ways we can share a record?

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:

  • OWD(Organization-Wide Defaults) allows you to give permissions to the organization-wide and to define baseline setting for the organization. It is also helpful in defining the user’s accessibility level to the user where a user can see other user’s records.
  • OWD settings can be Public Read Only, Private, Public Read, and Write.
  • Follow the steps for OWD: Go to Setup → find the Security Controls → click on ‘sharing settings’ → click on ‘Edit.

Manual sharing:

  • Manual sharing is sharing a single record/file to a single user or group of users through manual access.
  • We can see a button for manual sharing on the detail page of the record and it can be seen only when the OWD setting is private.

Criteria based sharing rules:

  • If we want to share records based on conditions such as share records with a group of users with the criteria of the country is India.
  • Follow the steps for criteria-based sharing rules: Go to Setup → security controls → sharing settings → select the object and provide name and conditions then click on save.

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.

34. What is a wrapper class in Salesforce?

A wrapper class is a type of container class, which contains a group of objects as its members. It is of an abstract data type. We use a wrapper class for enclosing the collected data. A wrapper class is defined by a programmer, that acts as custom objects, along with wrapper class properties.

The instances of a wrapper class are helpful in displaying various objects in the corresponding table on a Visualforce page.

Some of the main advantages of using wrapper class by developers in Salesforce are given below:

  • The wrapper class structure is as efficient as that of a good data visualization process for a web page, especially in the case where the developers are dealing with the JSON structure.
  • The developers are not required to manage the passing of any map structure in order to browse necessary elements. Moreover, usage of wrapper class by developers will lead to ease the process of managing relationships between different objects.
  • Wrapper class usage prevents any penalty faced by the users for passing an object of Salesforce. Also, it makes the respective object extendable to constructors of a class.
  • The use of the wrapper class supports the developers for efficiently organizing the concerned data, provided the data is properly nested.

35. What is Future annotation(@future)?

  • Future annotations are used to specify methods that are executed asynchronously.
  • Methods having future annotation must be static methods and can only return a void type. The arguments specified must be primitive data types or arrays of primitive data types or collections of primitive data types. These methods cannot take sObjects or objects as parameters.
  • When you specify a method with @future annotation, it will be executed only when Salesforce has available resources.
  • For example, you can use future annotation while making an asynchronous web service callout to an external service. Whereas without the usage of future annotation, web service callout will be created from the same thread which is executing the Apex code, and no additional processing will take place until that callout is complete (synchronous processing).

Syntax:

global class class_name
{
    @future
    Static void methodname(parameters)
    {
        //body of the method
    }
}`

36. What are the differences between SOQL and SOSL in salesforce?

SOQL(Salesforce Object Query Language) SOSL(Salesforce Object Search Language)
Using SOQL we can search only one object at a time Using SOSL we can search multiple objects at a time
We can query on all fields of any of the datatype  We can query on the fields whose data type is phone, text, and email
DML operations can be performed on query results DML operations cannot be performed on search results
Indexing happens synchronously Indexing happens asynchronously
We can use SOQL in the classes and triggers SOSL cannot be used in triggers but can be used in classes

37. Explain the types of SOQL statements in Salesforce.

Salesforce Object Query Language(SOQL) is useful in querying the records from database.com depending on the requirement. There are 2 types of SOQL statements: Static SOQL and Dynamic SOQL.

Static SOQL:

  • The Static SOQL statement is written using [] (array brackets). This statement is similar to IINQ (Ion Integrated Query).
  • It is used in the condition where you don’t have any dynamic changes in the SOQL query. We don’t use Static SOQL when the field name or where the condition is needed to be dynamically defined.

Example for Static SOQL query:

Contact[] contacts = [SELECT testfield__C, FirstName, LastName FROM Contact WHERE LastName = 'Dhanya'];

Dynamic SOQL:

  • It is used to refer to the SOQL string creation at run time with Apex code.
  • Dynamic SOQL allows you to create more flexible applications. For example, you are able to create a search based on end-user input or update records with different field names.
  • To create a Dynamic SOQL query at run time using a Database.query() method, in any one of the given below ways:
    • Return a single sObject when the single record is returned by a query.
      sObjects s = Database.query(string_limit_1);
    • Return a list of sObjects when more than a single record is returned by a query.
      List<sObject> sobjList = Database.query(string);

Example for Dynamic SOQL query:

String myTestString = 'TestName';
List<sObject> sobjList = Database.query('SELECT Id FROM MyCustomObject__c WHERE Name = :myTestString');

38. What are the different types of email templates available in Salesforce?

The list of different types of email templates that can be created in Salesforce is given below:

  • Text: All the users in the organization are allowed to create or change these templates.
  • HTML with letterhead: Only administrators and users with the “Edit HTML Templates” permissions are able to create these templates based on a letterhead. The look and feel of your HTML email templates are defined by the letterheads. It can inherit the logo, text, and color settings from a letterhead.
  • Custom HTML: It is an extension of HTML with a letterhead. Administrators and users having “Edit HTML Templates” permissions can create custom HTML templates without using the letterhead. You must have knowledge about HTML or get the HTML code to insert it into your email template.
  • Visualforce: Administrators and developers are allowed to create these templates by using Visualforce. Visualforce templates provide advanced functionalities like merging with a recipient’s data, where the content of a template can have data from multiple records.

39. What is Salesforce lightning?

Salesforce lightning is a component-based framework for application development, which has a collection of tools and technologies that aim to effectively increment the performance of the Salesforce platform. These tools include an entirely new version of a framework, visual upgrades, new and optimized interfaces, and more. It is designed to simplify processes for business users, who do not have any programming experience.

Using the lightning platform we can easily create apps that solve business problems and provide engaging experiences.

Few lightning features are:

  • Lightning app builder: It provides drag and drop capacities to facilitate the creation of an application and customization.
  • Lightning component framework: It consists of tools and extensions that allow the development of reusable components and standalone applications along with customization of the Salesforce mobile app.
  • AppExchange for components: It makes over 50 partner components present in the app builder.
  • Design system: It provides style guides and user experience practices for application development.
  • Lightning Connect: It is an integration tool that makes it easier for applications of Force.com to consume data from an external source that meets the OData specification.

40. Can you give an example of a Salesforce API and its usage?

Salesforce provides a variety of APIs that allows the developers to interact with the system in many ways. They are:

REST:

  • By using REST API you can easily integrate with Salesforce applications using simple HTTP methods in either XML or JSON formats. It is an ideal API for developing mobile applications or external clients.
  • Consider an example of retrieving information about the Salesforce version. You need to submit a request for the Versions resource by using the following code:
    curl https://yourInstance.salesforce.com/services/data/
  • You have to replace the “your instance” text with the instance for your organization.
    The output from this request is as follows.
[
    {
        "label" : "Winter '12",
        "url" : "/services/data/v23.0",
        "version" : "23.0"
    }
    ...
]

Bulk: The Bulk API provides programmatic access that lets you quickly loading and querying a huge amount of data into your Salesforce organization.

Streaming: The Streaming API can be used to trigger and receive notifications, whenever changes into Salesforce data are made according to the defined SOQL query criteria. It is useful when you want notifications to be pushed from the server to the client based on your defined criteria.

Conclusion

Salesforce is playing a vital role in any company’s sales and marketing automation activities. The demand for qualified Salesforce professionals has seen its peak in recent days. Moreover, competition is also becoming tough for Salesforce-related positions, so preparation is inevitable if you want yourself to shine out of the crowd.

Salesforce is increasingly used as a term synonymous with CRM. Organizations can utilize Salesforce for varied applications like Contact Management, Workflow Creation, Customer Engagement, Opportunity Tracking, Task Management, and many more. In addition, you can also collaborate with your colleagues, run analytics, and access Salesforce from a mobile dashboard.

Salesforce MCQs

1.

Who can manually share records in Salesforce?

2.

What do Master-Detail relationships will involve?

3.

When should you make use of bulk API?

4.

How can you create many to many relationships under salesforce?

5.

What do API calls in Salesforce represent?

6.

What must be done before a user can access the API?

7.

According to roles in the sharing hierarchy, ______ can view and edit the record.

8.

Salesforce API calls are

9.

In which file, exception codes are defined in Salesforce?

10.

Through sharing rules, which type of record access can be granted by the administrator?

11.

What can chatter-free user access?

12.

______ is not a component of the user record?

13.

When creating a sharing rule, what must an administrator select?

14.

______ method is not used to share records.

15.

What groups or individuals comprise public groups?

16.

What restrictions do double values in Salesforce have?

17.

______ is not a standard object?