Salesforce scenario based interview questions and answers pdf

Skip to content

1) Consider the scenario

  • I have a profile by name ‘ProvideReadAccess’ and two users U1 and U2 assigned to it. And I have object X.
  • My Question is I want to have ReadWrite access for U1 and ReadOnly access for U2 for the object X.
  • How do I do this?

Answer:

  • Read Access for both users is common hence in the Profile settings give ‘Read’ access for the object ‘X’
  • By doing this User U2 will be able to read all the records( One condition satisfied) but U1 will also be able to only read the records(Second condition not satisfied).
  • So next what do we do is we create a permission set say ‘GrantWriteAccess’ and in this permission set we give the object ‘X’ the Write access and assign the user U1 to this permission set.(2nd condition satisfied).

2) Consider the scenario

  • I have not given any CRUD permission in the profile ‘P1’ for an object O1, yet I’m able to create records for object ‘O1’. How could this be possible?

Answer:

  • Any permission with respect to creation /deletion/Updating/viewing of object is possible only through permission set or Profile.
  • Meaning If we are able to create records in a object then the Create Permission in either Profile or in Permission Set should be enables. If its not enabled in the Profile then it has be in the Permission set.
  • So check for the permission set.

3)Consider a scenario

  • I have two objects Obj1 and Obj2 which are not related to each other.Now I want to create a Master Detail Relationship(MDR) between these objects How can I do this?

Answer:

  • First choose which object has to be a Parent object(Master) and Child Object(Detail).
  • For our understanding lets say for now we decide Obj1 to be Master object and Obj2 to Detail object.

First lets under stand what’s a Master Detail relation ? Every child should have a parent. Which means every record in Obj2 should have a related parent record in Obj1. Also One child can have only one parent. But One parent can have multiple children.

Scenario 1: if there are pre existing records in the Obj2 then?

With the above understanding on Master Detail relation we have to be sure that every record in Obj2 has a related record in Obj1.

And in our scenario Obj1 and Obj2 are not related to each other. So first we have to create a basic Look up relation between these two objects so that we can establish a relation between these two objects.

So we follow below steps

1. we create a Lookup field in the Child Object Obj2 pointing to Obj1 as parent.

2. Update the Lookup field of all the records in Obj2 with a value from the Obj1 (Related field)

3. Then we convert the Look up field to Master Detail relation.

Scenario2: If there are no pre existing records in the Obj2 then?

4)Consider a scenario

  • I’m trying to implement Pagination. Initially i want to display 50 records and when user click on Next button, the records stating from 51 to 100 should get displayed. How do I accomplish this.

Answer:

  • The key question here is how do we fetch next 50 records when user clicks on ‘Next’?
  • One possible way to implement this is to have ‘OFFSet’ used in SOQL which fetches the records.

Eg: SELECT Name from Merchandise__c
where Price__c > 5
Order by Name Limit 100
OFFSET 50

5) Consider a scenario

  • I have two workflow Rules and two fields F1 and F2.
  • When ever F1 is updated to value= 10, WF1 fires and updates F1 value to 20 and F2 value to 30
  • When ever F1 values= 20 there is another Workflow WF2 fires which will update F1 to 10 and F2 to 20
  • What will be the outcome of this Workflow rule.

Answer:

  • This scenario will cause recursive Workflow rule
  • This will exhaust the governor limit and result in error

6)Consider a scenario

  • I have a User, Who will leave the organization tomorrow. He is basically a manager and there are 15 users below him.
  • Now when this user leaves the organization I would generally inactivate the User.
  • But now my concern is if I inactivate this user What happens to the Role hierarchy? the assignment rules, Approval processes, the records created by him and records to which he is the default owner like leads and cases.
  • what would be best possible solution to keep this application intact and running and yet have this user deactivated?

Answer:

  • To prevent users from logging into your organization while you perform the steps to deactivate them, you can freeze user accounts.
  • So in this way until you find ways to remove this User from Role hierarchy/assignment rules/update the Owner of the records created by him / from any place where this user is used, we can make use of FREEZE button on the user record.

Note:

1. When we click on FREEZE button, the user will not be able to login to the application any more.

2. Freezing user accounts doesn’t frees the user licenses available for use in your organization. We have to de activate the user to free the license.

7)Consider the scenario

  • I want to delete 20000 records and I don’t want them to be recovered from recycle bin.

OR

  • I want to do a mass delete on set of records and don’t what them getting into recycle bin.
  • What possible options do I have?

Answer:

  • Yes this is possible, Use Hard Delete Option

8)Consider the scenario:

  • Let say I have a page which displays the set of records from Account object and I’m using a standard controller.
  • Now I have two users belonging to same Profile. When they login and view this page, they get a message “Insufficient privileges”.
  • What could be the reason for this? Or who would u arrive at a solution?

Answer :

  • Notice below points:
  • Question speaks about standard Object and Standard Controller.
  • Also remember permission to a object is given by Profile.
  • So we need to check if the user has permission to read data of this Object.
    Only if the permission is given to the user,he’ll be able at access them else he will get an error message as “Insufficient privileges”

9)Consider the scenario:

  • I have Standard Controller and Controller Extension.
  • You can write all that logic in Controller Extension which can be written in Custom Controller. Also both Controller Extension and Custom controller execute in System Mode.
  • So Why do we need Custom Controller ?

Answer:

  • 1st point Controller Extension can’t exist on its own.
  • It has to be implemented on a Standard Controller or a custom controller.
  • So keeping the above point in mind, Let’s say certain methods needs to be executed in User Mode and certain in System Mode.
  • In this scenario it makes absolute sense to User Standard Controller with Custom Extension.
  • Where in using Standard Controller provides all preexisting features of Force.com platform.
  • But note that When we use Standard Controller All the Sharing rules, permissions of a user are respected.
  • So if this what we wanted then we should go for an implementation of this sort.
  • Other wise if we are building all features on own like Save Edit Update and delete then we should be using Custom Controller.

What is scenario in Salesforce?

Business scenarios help you bridge the gap between your organization's business capabilities and the solutions needed to achieve your goals. For each scenario, discover a variety of Salesforce solutions that reduce your time to value and allow you to define a roadmap to build out your organization's functionality.

What is Salesforce basic interview questions?

Salesforce Interview Questions and Answers.
What is Salesforce? ... .
What is a custom object in Salesforce? ... .
What does a custom object permit the user to do? ... .
What is Self-Relationship? ... .
What is Object Relationship Overview? ... .
What can cause data loss in Salesforce? ... .
How is SaaS beneficial to Salesforce?.

How do I prepare for a Salesforce interview?

How to prepare for a Salesforce interview.
Understand what the hiring manager is actually looking for..
Note down some examples of the work you have done, that is going to be useful to the hiring manager..
Research the company..
Research the hiring manager..
Be confident and be honest..

What are the Salesforce admin interview questions?

Here is list of all Salesforce admin interview questions and answers:.
What is Salesforce? Salesforce is the world's #1 customer relationship management (CRM) platform. ... .
What is Cloud computing? ... .
What is CRM? ... .
What are some CRM provider. ... .
What are different types of cloud computing? ... .
What is PaaS? ... .
What is SaaS? ... .
What is IaaS?.