Salesforce Interview QuestionsSalesforce

Salesforce Admin Interview Questions and Answers: Part 1

1. What is Object in Salesforce?

In Salesforce, an object is similar to a database table. It is used for storing data and is designed to store information about a specific topic or concept within the Salesforce platform.

Objects in Salesforce are divided into two main categories:

1. Standard Objects: Standard objects are pre-defined by Salesforce and are available in every Salesforce instance. These objects represent common business concepts and data structures. These include account, contact, opportunity, lead, campaign and so on.

2. Custom Objects: Custom objects are created by Salesforce users (usually administrators or developers) to store information that is specific to the organization’s unique processes or requirements that are not covered by standard objects. Custom objects can be tailored to suit any type of data tracking needs and can establish relationships with other objects (both standard and custom).

Object Characteristics

objects in salesforce

  • Fields: Each object consists of fields, similar to columns in a database table, which store specific pieces of data for every record. Objects can have standard fields and custom fields.
  • Records: Comparable to rows in a database table, records are instances of data stored in an object. Each record is a unique entry.
  • Relationships: Objects can be related to each other. Salesforce supports various types of relationships like lookup relationships (similar to a foreign key relationship in relational databases) and master-detail relationships (a close parent-child relationship where operations on the parent can affect the child).

2. Difference between Standard and custom object.

Standard Object Custom Object
Can’t delete Can delete
Can’t change the Grant Access using Hierarchies sharing access Can change the Grant Access using Hierarchies sharing access
We can’t Truncate standard objects It is possile to Truncate custom objects
It is possible to create custom fields on standard objects Custom objects contain some standard field, for example, Name, Created by, Last Modified by and so on

3. What is Master-Detail relationship?

Master Detail relationship is the Parent child relationship. In which Master represents Parent and detail represents Child. If Parent is deleted then Child also gets deleted. Rollup summary fields can only be created on Master records which will calculate the SUM, AVG, MIN of the Child records.

  • Single object can have a maximum of two master-detail relationships.
  • Parent field on child is required.
  • Access to parent determines access to children.
  • Deleting parent automatically deletes child.
  • A child of one master detail relationship cannot be the parent of another.
  • Lookup field on page layout is required.

4. A custom object contains some records, now my requirement is to create a field in this object with master-detail relationship. Can we create master-detail relationship in this case?

No, directly we cannot create master details relationship if custom object contains existing records.
Steps to follow:

  • First create field with lookup relationship.
  • And then associate look field with parent record for every record
  • Next change the data type of the field from look up to Master detail.

5. What is a “lookup relationship”?

Lookup relationships are used when you want to create a link between two objects, but without the dependency on the parent object.

  • You can have a maximum of 40 lookups on an object. .
  • No impact on deletion.
  • Lookup field is not required
  • You can have a Total of 40 Relationship fields with a Maximum of 2 Master Detail Relationships.
    So you can have all 40 as Lookup Relationship fields,
    38 Lookup and 2 Master Detail,
    39 Lookup and 1 Master Detail relationship fields on an object

6. Difference between Master Detail and Lookup Relationship?

Lookup Master-detail
Loosely coupled. Strongly coupled.
Roll-up summary field cannot be created. Roll-up summary field can be created.
Parent record is not required while creating a child record. Parent record is always required in order to create a child record.
Lookup fields are not required on the page layout of the detail record. Master-detail field is always required on the page layout of the detail record.
Standard object record can be on the detail side of a custom object in a lookup relationship. Standard object record cannot be a child.
By default record ownership of child records is not controlled by the parent. Parent controls the record ownership of child records. The owner field is not available on the detail record in master-detail relationship queues, sharing rules and manual sharing is not possible for detail records as it requires the owner field.
You can have a child record without a parent. You cannot have a child record without a parent.
You can have a maximum of 40 lookups on an object. You can have a maximum of two master details on an object.
No cascade delete. Cascade delete.

7. What is the rollup summary?

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. A read-only field that displays the sum, minimum, or maximum value of a field in a related list or the record count of all records listed in a related list.

8. What is a many-to-many relationship?

The many-to-many relationship in Salesforce allows us to link a child record to multiple parents.

If you have two objects, called Case and Bug, and you want to relate these two objects in such a manner that a bug could be related to multiple cases and a case could also be related to multiple bugs, then we have to use the many-to-many relationship.

The many-to-many relationship is made with the help of a junction object.

9. What is Junction Object?

A custom object with two master-detail relationships. Using a custom  junction object, you can model a “many-to-many” relationship between two objects.

10. What is Data Import Wizard in Salesforce?

Data Import Wizard is a tool that allows you to import data from a CSV file into your Salesforce organization.
➤This tool, accessible through the Setup menu which lets us import data in common standard objects, such as contacts, leads, accounts, opportunities, as well as data in custom objects.
➤ It can import up to 50,000 records at a time.
➤ It provides a simple interface to specify the configuration parameters, data sources, and field mappings that map the field names in your import file with the field names in Salesforce.


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button