salesforce interview questions and answers
salesforce interview questions and answers

salesforce interview questions and answers – Basic

Salesforce Basic Interview Questions and Answers

1. What is an App in Sales force?

An app is a set of tabs that work together to do something useful. Users can move from one app to another.
using the drop-down menu at the top right of every page for the app.
You can change the way apps work to fit the way you work, or you can make new apps by putting together standard
and special tabs.
To make an app in Sales Force, go to Setup > Build > Create > App > Click on “New” and make your app.
application based on how you want it.

2. What is the object in Sales force?

Custom objects are tables in a database that let you store information about your organization. You can use custom objects to add to the features of or to build new ones.
function of an application.
Once you’ve made a custom object, you can make a custom tab, custom related lists, reports, and
dashboards that let users interact with the data from the custom objects. You can also get to data about custom objects.
through the API for
To make an object in sales force, go to Setup, then Build, then Create, then Object, then click on “New Object,” and
create an object based on what you want.

3. What does “Lookup Relationship” stand for?

  • This kind of relates two Objects together .
  • Objects can be up to 40.
  • Parent does not have to be filled out.
  • Nothing to do with security or access.
  • It has no effect on deleting.
  • 2 Can have more than one layer.
  • There is no need for a lookup field.

4.What does “Master-Detail Relationship” mean?

  • It is a Parent-child relationship
  • Where Master is Parent and detail
    is Child object.
  • If we remove Parent also removes Child.
  • Fields in a rollup summary can only be created on Master records that calculate the SUM, AVG, and MIN of the Child records.
  • There can be up to two objections.
    The parent field on child must be filled in.
  • How to access to a child depends on how to access to a parent.
  • When you delete parent, you also delete child.
  • A child of one master-detail relationship can’t be the parent of another.
  • The page layout must have a lookup field.

5. How do I make a relationship between Many and Many?

The relationships between Lookup and Master detail are one to many. We can make many-to-many links.
using a junction object to connect them. Junction object is a custom object with two master details.

6. Some records are in a custom object, and now I need to add a field to this object with master relationship between details. In this case, can we set up a master-detail relationship?

No, we can’t create a master-detail relationship right away if a custom object already has records.
Here are the steps to make a master-detail relationship when there are already records in
custom object.
1) you need to make a field with a lookup relationship.
2)for every record, link every look field with its parent record.
3) Next, switch the field’s data type from “look up” to “Master detail.”

7. Name some types of custom fields.

Text, Pick list, Pick list (multiple select), Date, Email, Date/Time, Date, Currency, Checkbox, Number,
Percent, Phone, URL, Text Area, Geolocation, Lookup Relationship, Master Detail Relationship, and so on…..

8. What is Salesforce’s TAB?

Tab is a part of the user interface that the user makes to show data from a custom object.
Tabs come in three different kinds.
1)Custom Tabs
2)Visual force Tabs
3)Web Tabs

9 Does the user have the option to put in their own logo when making their own custom apps?

Yes, a user can put their own logo in their documents and then choose that logo for their organization.

10. What kinds of changes can be made to page layouts?

We can change things like Fields, Buttons, Custom Links, and Related Lists on the page layout.
We can also make parts.

11. What is a “Self Relationship”?

Self Relationship is an object-to-object lookup relationship. Suppose let’s take an object
“Merchandise”. Here, we can set up a connection between two accounts (same object)
object. “Self Relationship” is the name for that.

12. In the “Master-Detail Relationship,” what are the most important things to keep in mind?

Access to a record’s level is set by the parent, and the child must have it for the parent’s reference.
delete (if you delete the parent, it can cascade delete the child) (if you delete the parent, it can cascade delete the child).

13. How are triggers and workflow different?

1)Workflow is an automated process that takes action based on rules and evaluation criteria.
2)We can use the object to get to a workflow.
3)On workflow, we can’t do DML operations.
4)We can’t ask questions of the database.
1)Trigger is a piece of code that runs before or after adding or changing a record.
2)We can get to the trigger all over the object and for that object.
3)In one trigger, we can use 20 DML operations.
4)In one trigger, we can use 20 SOQLs from the database.

14. What is Wrapper Class in Apex?

A class that holds a group of other objects is called a Wrapper class.
It is used to show different things in the same table on a Visual Force page.

15. What makes SOQL and SOSL different?

  • SOQL(Salesforce Object Query Language) (Salesforce Object Query Language)
  • We can only search for one thing at a time with SOQL.
  • We can run queries on all fields of any type of data.
  • SOQL can be used in classes and triggers.
  • We can do DML operations on the results of a query.
  • SOSL(Salesforce object Search Language) (Salesforce object Search Language)
  • With SOSL, we can look for many things at once.
  • We can only do a query on fields that are text, phone, or email.
  • We can use in classes, but not in Triggers.
  • We can’t do DML operations with search results.

16. What is difference insert() and database .insert() ?

  • Using the “insert” method, we can add records, but if any of them have a mistake, the system will throw an
    error insertion fail, and none of the records are added.
  • We’ll use database.insert if we want to run a bulk insert operation with only some of its goals met.

17. What are Static Resources?

Using Static Resources, we can upload images, zip files, jar files, java script files, and CSS files that can be used on a website.
referred to on a page about visual force
A group’s Static Resources can only be up to 250mB in size.

18. How do I use Static Resource in Visual Force page to call a Java script?

Add a Java script file in Static Resource setup > develop > Static Resources > click on “New” > Name:
filename, choose a file from your local desktop to add, and save.
This is how we can use that file on the Visual Force page:
<apex: includescript values=” {! $Resource.fileName}”/>

19. What is sharing rule in Salesforce?

It is used to share Salesforce records to other users with some specific rules. or in other word

If we want to give the access to other users we use sharing rules.

20. How many ways we can share a record in Salesforce?

Role Hierarchy Set up:
If we add a user to a role, the user above them in the role hierarchy will have read access.
Setup > Manage Users > Roles > Setup Roles > Click “Add Role,” give it a name, and click “Save.”
Sets the organization’s basic parameters.
Sets how much access a user has to the record of another user.
OWD can be private, public but only for reading, or public but also for writing.
Setup > Security Controls > Sharing Settings > Click “Edit”
Manual Sharing:
Manual Sharing is when a single record is shared with a single user or a group of users.
We can see this button on the record’s detail page, but only when the OWD setting is set to “private.”
Rules for sharing based on criteria:
India is a country that fits the criteria.
Setup > Security Controls > Sharing Settings > Choose the object and give it a name.
Conditions and how to get
Sharing the apex:
Every object can be used as a share object (For Account object share object is AccountShare ). If we want
Using Apex, we have to add a record to the share object in order to share the records.
note: (We can use 100 SOQLs and 150 DMLs in a single trigger.I tested this) (We can use 100 SOQLs and 150 DMLs in a single trigger.I tested this.)

22. How many different ways can we make this field is required?

There are four different ways as below:

1. While creation of field
2. Validation rules
3. Page Layout level
4. Using Trigger

23. What’s the difference between a role and a profile?

Role is Record level access, and not all users have to have it.
Profile access is at the object and field level, and all users must have it.

24. How many different ways can we call an Apex class?

1. Visual force page
2. Web Service
3. Trigger
4. Email services
5. Using Scheduling

25. How to create Master Details relationship between existing records?

We can’t make a Master-Detail relationship between two already-existing records without first making a new record.
Lookup relationship and give valid lookup fields, and it shouldn’t be null.

26. What is permission set?

Permission sets give users more access to functions without changing who they are.
Example: A user’s profile only gives them read access to a custom object, but the administrator wants to give them write access.
You can edit and add operations to his profile without changing it. The permission set is made by the administrator.
Having the ability to edit and create on a custom object and assigning it to that user.

27. What is manual sharing?

To manually share a record with a certain user, you have to do it yourself.
Go to the record’s detail page and click on the “manual sharing” button. Assign that record to another user with the “assign” button.
You can either read or read/write.
Only when OWD is private to that object does the Manual Sharing button light up.

28. How can we change the Grant access using role hierarchy for standard objects?

Grant access using role hierarchy for standard objects Is Not possible.

29. What does “Transfer Record” mean in the profile?

If a user can only read a record but wants to change the name of the record’s owner,
if he wants to change who owns that record, he can do so in the profile level Transfer Record.

30. What is Field dependency?

Based on what is chosen in one field, filter the choices in the other field’s pick list.

31. Does a check box act like a control field?

Yes possible. Check box or pick list should be used for the controlling field.

32. How does Roll-up summary work?

Roll-up shows the number of child records and figures out their sum, minimum, and maximum values.
child files.

33. How to make Roll-up summary field on lookup relation?

Not possible. Only the Master–Detail relationship has roll-up summary turned on.

34. What are the Record Types?

Record Types limit the choices in pick lists and link them to different page layouts.
different kinds of records.

35. What is Audit Trail in Salesforce?

Audit Trail lets an administrator see or keep track of all the recent changes to the setup.
have been done to the group.
This can hold data from the last 6 months.

36. What are the types of reports?

Salesforce has four types of reports.
Tabular Reports: We can only show the total amount in a table.
Summary Reports: It is a detailed report where the information is grouped by columns.
Matrix Reports: It is a detailed report where the grouping is done by both rows and columns.
Joined Reports: We can combine two or more reports into a single report that looks like

37. What is a Dashboard in Salesforce?

Dashboard is a way to show report in pictures. Up to 20 reports can be added to a single

38. When calling a web service from Apex, what is the default timeout?

10 Sec

39. How to update the record using the After Trigger context?

Not possible. You will get an error message like “Record can only be read.”

40. What’s the difference between “Export” and “Export All” in Salesforce’s Data Loader?

Export means to send all of the data from, except for the data in the recycle bin.
Export All means to send out all the information from Salesforce, including the information in the recycle bin.

41. What does “ALL ROWS” mean in SOQL?

ALL ROWS is used to pull records out of the recycle bin.
Example: SELECT Id from Campaign ALL ROWS
-> In the developer console, “ALL ROWS” doesn’t work.

42. What does “FOR UPDATE” mean in SOQL?

The records are locked with FOR UPDATE.
Example: Campaign cam = [SELECT id FROM Campaign LIMIT 1 FOR UPDATE];

43. What is “savepoint” used for in apex?

This is what will be used to undo the changes.

44.We are not providing some of fields in .csv file which are required in page layout level. What happens if we try to insert records into Salesforce through data loader?

All records are inserted in Salesforce successfully.

45. What is a sandbox url in Salesforce?

46. What is a sandbox for developers?

It only copies changes to the configuration from the production
It won’t copy data in real time.
We can test the changes to the configuration with test data.
Sample data limit is 200mb
The time between refreshes is one day.
If we refresh, all of the content in the sandbox will be replaced with content from the real world.

47. What’s the difference between ISBLANK() and ISNULL()?

ISNULL() only works on number fields. If we don’t put a value in a number field, ISNULL() will return false.
return true.
ISNULL() won’t work with TEXT fields because text fields can never be empty.
ISBLANK() works with both number and text types of data.

48. What does “out of the box” mean in Salesforce?

n terms of the sfdc standard functionalities or features (no need to code).

49. What is validation rule?

Validation rules are used to prevent invalid data entry in Salesforce records.

While creating or modifying the record based on the certain conditions we can display error messages
on top of the page or below to the filed.

50. What are Governor Limits in Salesforce?

Since we are working in multitenant environment Salesforce is enforcing the limits for all resources.

Example CPU time limit,Apex limits,Transactional limits,SOQL limits etc