• No products in the cart.

Common Salesforce Interview Questions & Answers

Some Common Interview Questions asked during the recruitment of Salesforce Developer are explained with suitable answers.

  1. Is it possible to have the same profile for two users? Is it possible to assign two profiles to the same user?

 Profile defines the user’s permission to perform different functions. It determines the accessibility of a user towards the records. Yes, one profile can be allocated to any number of users. A user profile can have control over three categories namely permissions, access to data and UI. And each user will only be assigned with a single profile.


2. What is meant by Governor Limits in Salesforce? 

Governor Limits are run time limits which are strictly enforced by the Apex run time engine to ensure that the apex code is on limit, this is serious because it’s a nightmare of a Salesforce Developer when the runtime exception occurs which cannot be handled. Governor limits are Salesforce’s way of forcing you to write efficient and scalable code. Salesforce is based on the concept of multi-tenant architecture, where the client uses the shared resources.


3. Explain about Sandbox. Mention the different types of Sandboxes in Salesforce?

     A Sandbox is a copy of the Production Environment or Organization, used for testing and development purposes. You can create multiple copies of your organization and use it for different purposes without compromising on the data. Sandboxes are completely isolated from the production environment so that you can work on Application development without any hassle. You can use the sandbox when you want to test a newly developed Force.com application or a Visualforce page. Salesforce provides four types of Sandboxes,

  • Developer Sandbox
  • Developer Pro Sandbox
  • Partial Data Sandbox
  • Full Sandbox


4. In standard field record name how many data types can have?

 With limit of 80 characters a standard field record name can have data types of either auto number or text field.


5. Why are Visualforce pages served from distinct domains?

 Because to leverage the browser security model to protect the Salesforce customers and the salesforce.com service from cross-site scripting and cross-site request forgery attacks.


6. Brief about the different types of object relations in Salesforce?

  We can establish many types of relationships amid objects in Salesforce.

  • Master-Detail Relationship (1: n): This is a parent-child relationship in which the master object controls the behavior of the dependent child object, where one parent can have many children. The master field cannot be empty and if a record/ field in master object is deleted, the corresponding fields of the dependent object also gets deleted. This is known as the cascade delete. One can define master-detail relationships amidst two custom objects or between a custom object and a standard object as far as the object is the master in the relationship.
  • Lookup Relationship (1: n): This relationship is used when you want to create a link between two objects, without the dependency on the parent object. It is more similar to Master-Detail Relationship, but the difference here is that any deletion in the record will not result in automatic deletion of the lookup field in the child object. There is no cascade delete here, so the child fields doesn’t inherit the sharing or security settings of its parent.
  • External Lookup Relationship: Creates a relationship that links the object to an external object whose data is stored outside the Salesforce org.
  • Indirect Lookup Relationship: An indirect lookup relationship allows us to link to an external object to a standard or custom object with a unique external ID field on the parent object that is used to match the records in this relationship.
  • Many to Many Relationship:This is also called as Junction relationship which exists when there is a necessity to create two master-detail relationships. Two master-detail relationships can be created by linking three custom objects. Here, two objects will be master objects and the third object will be reliant on both the objects.
  • Hierarchical Relationship: Only one user object can have this type of relationship where we can create a hierarchy of users in the organization.


6. What happens to detail record once a master record is erased / deleted? What happens to child record when a parent record is erased / deleted?

     In a Master-Detail relationship, when a master record is deleted, the detail record is deleted naturally, this is called as cascade delete.

     In a Lookup relationship, even if the parent record is deleted, the child record will not be deleted.

7. State the difference between a Role and Profile in Salesforce?

A profile will control access to which records a user has access, no user will be able to work on the Salesforce org without being assigned a profile therefore its mandatory.

But a Role is not mandatory for every user. The primary function of the Role hierarchy is that it permits higher level users in hierarchy to get access to the records owned by lower level users of the hierarchy.


8. What are Triggers in Salesforce? Explain how they differ from Workflows?

Trigger is a piece of code that gets executed before or after a record is inserted or updated, they can be accessed across the object and related to that objects. We can use 20 SOQLs from database in on trigger. Workflow is an automated process that uses no code.


9. Can you have a roll-up summary field in case of the Master-Detail relationship?

Yes, it’s possible but not in the case of a lookup relationship. Just 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, the detail record must be associated to the master through a master-detail relationship. In this field you can either count the number of detail records related to a master record, or you can calculate the sum, min or max value of a field in the detail records


10. How many types of email templates can be created in Salesforce?

  • HTML with letterhead – Only admins and users having “Edit HTML Templates” permissions can create this template depending on the letterhead.
  • Custom HTML – It also has the similar permissions to create this email template like the one mentioned above.
  • Visualforce – Only admins and developers can create this template. Advanced functionalities like merging data from multiple records are available only in this visualforce template.

August 12, 2019

0 responses on "Common Salesforce Interview Questions & Answers"

Leave a Message