0% found this document useful (0 votes)
33 views

Salesforce Interview Questions

The document outlines various scenario-based interview questions related to Salesforce administration and development. Key topics include record management, user permissions, data deletion, field tracking, and querying techniques. It also addresses best practices for enforcing naming conventions, handling batch processes, and managing component communication.

Uploaded by

khumed Khatib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Salesforce Interview Questions

The document outlines various scenario-based interview questions related to Salesforce administration and development. Key topics include record management, user permissions, data deletion, field tracking, and querying techniques. It also addresses best practices for enforcing naming conventions, handling batch processes, and managing component communication.

Uploaded by

khumed Khatib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Scenario Based Interview Questions

1.Display when the first opportunity was created on Account object?

Use Rollup summary -Use Aggregate function (Mininum of created date field)

2.Does the ID of record will change if we undelete the deleted record?

The ID field is generated at the time record creation will never change.

3.Administrator grants a user broad permissions,including view All Data and Modify All
Data.However the user is still unable to access or modify certain fields on records. Can
you explainwhy this might be happening?

View All data,Modify All Data ,view All, modify All permissions don’t override field level
security. User must still have field permissions to read or edit each field on object.

4.The IT Department wants to ensure that all salesforce users adhere to a standard
naming convention for account records. How would you enforce this naming
convention?

By using Validation rule , compare the user enterted name against the pre defined naming
convention criteria.

5.User A has 10 his own records of account,UserB has 30 records of all account,User C
unable to see any of the record and not able to see even tab of the object
Note- They are all in same profile.

Profile : Tab hidden


OWD:Private
Permission set 1: Tab is visible-> Assigned to User A and User B
Permission set2:View All->Assigned to User B
6.User has object level CRUD access in his profile for Contract object even he cannot
delete the contract record what is the reason?

He should have system permission in profile level Delete Active Contract


Setup → Profiles → [User’s Profile] → System Permissions → Contract: Delete
Activated Contracts

7.User Want to delete 40,000 record but do not want anyone to recover them. How can
you achieve it?

To delete bulk records permanantely, we can use Hard Delete, to enable this go to user's
profile and enable "Bulk Api Hard Delete" and use tools like Data Loader to hard delete
data(in data loader setting, check Enable Bulk API and Enable Hard Delete.

8.Your team has noticed that some important field updates on the Account object need
to be monitored with old value and new values How can you achieve that?

We can enable field tracking history for the fields for which we want to track old and new
values.

9.The Service Request object has two fields Service type and priority level. The priority
level field options vary based on the selected service Type How can you achieve that?

We can achieve this requirement using dependent picklist.

10.I have three batch classes and while running them, how can i ensure that they dont
overlap with each other

We can use Finish() method of each batch class to start the next batch class after the
current one completes

11.Is it possible to modify or deactivate a trigger in production?

No, we cannot directly modify or deactivate a trigger in production.

12.In Apex class annotated with ‘with sharing’, which contains a SOQL query on Account
with custom field satus__c, what error will occur if a user without access to this field
attemps to run code?

“With sharing ” keyword enforce only record level security


Field level security will not be enforced automatically unless explicitly specified.
So in this we will not get any error.
13.If user is frozen and an email alert is associated with their email address, will they
still receive the email ?

Freezing a user only prevents them from login in to salesforce. It doesnot stop email
alerts from being sent to them.

14.If i want to perform DML on both User and Account object with in the same flow.How
to avoid Mixed DML error in this flow?

By using the Schedule path we can do any one of the DML in this path we can avoid
Mixed DML exception

15.I have two component which are unrelated to each other. If i want to pass data from
one component to another how will you do that?

To handle communication between two unrelated components Lightning Message


Service is the ideal Solution.

16.If i have 10000 records and my batch size is 200 How many batch will run?

Batch=No.of records/batch size


10000/200
50 batches will run

17.Is code written in Anonymous Window by default execute in User mode or System
mode?

Anonymous Window by default execute in User mode.

18.How will you access the private methods in Test Class?

By annotating the method with @TestVisible

19.Fetch Accounts that do not have any related Contacts and Opportunities

SELECT Id, Name FROM Account


WHERE Id NOT IN (SELECT AccountId FROM Contact) AND
Id NOT IN (SELECT AccountId FROM Opportunity)

20.Fetch all Cases associated with Contacts where the Case Owner is Active

SELECT Id, CaseNumber, Owner.Name, ContactId,Contact.LastName


FROM Case
WHERE ContactId != NULL And
Owner.IsActive = TRUE

You might also like