Salesforce Interview Questions
Salesforce Interview Questions
Use Rollup summary -Use Aggregate function (Mininum of created date field)
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.
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?
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
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?
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?
16.If i have 10000 records and my batch size is 200 How many batch will run?
17.Is code written in Anonymous Window by default execute in User mode or System
mode?
19.Fetch Accounts that do not have any related Contacts and Opportunities
20.Fetch all Cases associated with Contacts where the Case Owner is Active