Salesforce Interview Questions

[tabby title=”Configuration”]

How many relationships included in SFDC & What are they? 

Master-Detail (1:n) — A parent-child relationship in which the master object controls certain behaviors of the detail object:

Lookup (1:n) — This type of relationship links two objects together, but has no effect on deletion or security. Unlike master-detail fields, lookup fields are not automatically required.

Many-to-many — You can use master-detail relationships to model many-to-many relationships between any two objects. A many-to-many relationship allows each record of one object to be linked to multiple records from another object and vice versa. For example, you may have a custom object called “Bug” that relates to the standard case object such that a bug could be related to multiple cases and a case could also be related to multiple bugs. To create a many-to-many relationship, simply create a custom junction object with two master-detail relationship fields, each linking to the objects you want to relate. See the Salesforce online help for details.

Reference <


How can I create Many – to – Many relationship?

Creating the many-to-many relationship consists of:

  1. Creating the junction object.
  2. Creating the two master-detail relationships.
  3. Customizing the related lists on the page layouts of the two master objects.
  4. Customizing reports to maximize the effectiveness of the many-to-many relationship.

 Reference  <>


What is Static Resources?

 Static resources allow you to upload content that you can reference in a Visualforce page, including archives (such as .zip and .jar files), images, stylesheets, JavaScript, and other files.


  • To reference a stand-alone file, use $Resource.<resource_name> as a merge field, where <resource_name> is the name you specified when you uploaded the resource. For example:


<apex:image url=”{!$Resource.TestImage}” width=”50″ height=”50″/>
<apex:includeScript value=”{!$Resource.MyJavascriptFile}”/>


To reference a file in an archive, use the URLFOR function.

 <apex:image url=”{!URLFOR($Resource.TestZip,‘images/Bluehills.jpg’)}” width=”50″ height=”50″/>

 Reference <>


What is sharing rule?

With sharing rules, you can make automatic exceptions to your organization-wide sharing settings for defined sets of users. For example, use sharing rules to extend sharing access to users in public groups, roles, or territories. Sharing rules can never be stricter than your organization-wide default settings.

 Reference   <>


How many ways we can share a record? Managed Sharing managed sharing involves sharing access granted by based on record ownership, the role hierarchy, and sharing rules:

  •  Record Ownership

Each record is owned by a user or optionally a queue for custom objects, cases and leads. The record owner is automatically granted Full Access, allowing them to view, edit, transfer, share, and delete the record.

  •  Role Hierarchy

The role hierarchy enables users above another user in the hierarchy to have the same level of access to records owned by or shared with users below. Consequently, users above a record owner in the role hierarchy are also implicitly granted Full Access to the record, though this behavior can be disabled for specific custom objects. The role hierarchy is not maintained with sharing records. Instead, role hierarchy access is derived at runtime.


Sharing Rules

Sharing rules are used by administrators to automatically grant users within a given group or role access to records owned by a specific group of users.


User Managed Sharing, also known as Manual Sharing

User managed sharing allows the record owner or any user with Full Access to a record to share the record with a user or group of users. This is generally done by an end-user, for a single record. 

Users with the “Modify All” object-level permission for the given object or the “Modify All Data” permission can also manually share a record. User managed sharing is removed when the record owner changes or when the access granted in the sharing does not grant additional access beyond the object’s organization-wide sharing default access level.

 Apex Managed Sharing

Apex managed sharing provides developers with the ability to support an application’s particular sharing requirements programmatically through Apex or the SOAP API. This type of sharing is similar to managed sharing. Only users with “Modify All Data” permission can add or change Apex managed sharing on a record.

 **Apex sharing reasons and Apex managed sharing recalculation are only available for custom objects.**


Reference <>


How many types of possible actions are there in workflow? 

         1. Email Alert

         2. Task

         3. Field Update

         4. Outbound Message


How many ways we can made field is required?

  • Make a field Required while creating it by checking the Required check box:- This makes that field required for everyone in the organization. In other words this is like making the field required from Field Level security.

This will be used if the requirement says ” I want to make sure that all sfdc users should enter Salary Amount in the payment details record”

  • Make a Field required via Page layout:- This is done to make sure that for that particular Page layout this field is mandatory and for others it is not.


The Requirement will be like ” I want to make salary amount mandatory in payment details object for salary pagelayout but not for Interviewed people in Interviewees salary pagelayout”

  • Make a field required by a Validation Rule:- This is to make sure that a field is mandatory on a particular condition.

 The Requirement will be like “Make the Salary Amount mandatory if the  Interview status says Selected”

  • By writing  triggers


What is difference between Role and Profile? 

  • Roles are one of the ways you can control access to records. They also impact reports (e.g. “My Teams” filter). Roles come into play if your security model (OWDs) are set to private.)( record-level access)


  • Profiles help determine record privileges. Assuming the User can see the record, Profiles determine what the User can do, view or edit on that record. Profiles control other system privileges as well (mass email, export data, etc) ( object- and field-level access)


  • It is mandatory to have a profile but not a role.


What is permission set?

Permission sets extend user’s functional access without changing user’s profile.


Ex:  A user has only read access through profile on custom object, administrator want to give access Edit and create operations to him without changing the profile. Administrator creates the permission set having edit and creates operation on custom object and assign to that user.


What is manual sharing?

Manual sharing is to share a record to a particular user manually.

Go to detail page of record and click on manual sharing button and assign that record to other user with Read or Read/Write access.

Manual Sharing button enables only when OWD is private to that object.



[tabby title=”Apex”]

Coming Soon..


  • admin says:

    In Which sequence Trigger and automation rules run in The following is the order salesforce logic is applied to a record.

    1. Old record loaded from database (or initialized for new inserts)
    2. New record values overwrite old values
    3. System Validation Rules
    4. All Apex “before” triggers (EE / UE only)
    5. Custom Validation Rules
    6. Record saved to database (but not committed)
    7. Record reloaded from database
    8. All Apex “after” triggers (EE / UE only)
    9. Assignment rules
    10. Auto-response rules
    11. Workflow rules
    12. Escalation rules
    13. Parent Rollup Summary Formula value updated (if present)
    14. Database commit
    15. Post-commit logic (sending email)

Leave a Reply to admin Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Visit Us On FacebookVisit Us On Twitter