Salesforce Important interview questions

Hi in this post of salesforce article i am going to share salesforce interview questions that my friend Ankit Jain has shared. Some of questions are answered some need to be answered. Hope these questions may help you. Please do share if you have more questions in salesforce and java.

1. Name three Governor Limits .
50,000 records limit soql
100 soql
150 dml fire
2. When do you use a before vs. after trigger?
Before until we don’t need id field
3. What’s the maximum batch size in a single trigger execution?
4. What are the differences between 15 and 18 digit record IDs?
Case sensitive
5. Provide an example of when a Custom Setting would be used during
6. When should you build solutions declaratively instead of with code?
Wherever possible
7. Give an example of a standard object that’s also junction object.
8. Describe a use case when you’d control permissions through each of the
9. – Profiles
10. – Roles
11.– Permission Sets
12. – Sharing Rules
13. When should an org consider using Record Types?
14. What are some use cases for using the Schema class?
Check for access Schema.isAccessable,Creatabe,getting describeresult
15. A trigger is running multiple times during a single save event in an org.
How can this be prevented?
Use Trigger.isExecute
16. Why is it necessary for most sales teams to use both Leads and
17. What is the System.assert method and when is it commonly used?
Compare 2 values
18. What are the differences between SOQL and SOSL?
Multi object search ,single object soql seacrh 10000 records total,sosl search
19. Order the following events after a record is saved:
20. – Validation rules are run
21. – Workflows are executed
22. – “Before” triggers are executed
23. – “After” triggers are executed
24. What is Trigger.old and when do you normally use it?
Deletion,account merge
25. When should you use a lookup instead of a masterdetail
When parent is not manditory and you dont need rollup sumary
26. What are the advantages of using Batch Apex instead of a trigger?
27. What are the pros and cons when using a Workflow Rule Field Update
vs. a Formula Field?
28. What are the differences between a Map and a List?
Map key values
29. What are the advantages of using Batch Apex instead of a trigger?
30. Describe a use case for Static Resources.
Easy caching
31. Provide an example of when a Matrix report would be used. How about
a Joined report?
32. A group of users must be prevented from updating a custom field.
What’s the most secure method of preventing this?
33. When would you use the @future annotation?
Setup,non setup object,api callouts
34. List three different tools that can be used when deploying code.
Eclipse.Ant,CHange set
35. When should an Extension be used instead of a Custom Controller?
36. What are the advantages of using External Id fields?
Import data
37. What are the uses of the <apex:actionFunction> tag?
Calling remote functions from java script
38. What are the differences between static and nonstatic
variables in
Access by class name
39. What are some best practices when writing test classes?
@testsetup,@testvisible,System.assert 3 parameters ,test.starttest,stoptest
40. What does the View State represent in a Visualforce page?
Encrypted data ,state of page
41. What are three new features in the most recent Salesforce release?
42. Describe the benefits of the “One Trigger per Object” design pattern.
43. Write a SOQL query that counts the number of active Contacts for each
Account in a set.
44. Declaratively create logic in your org that prevents two Opportunities
from being created on a single Account in a single day.
45. Declaratively create logic in your org that prevents closed Opportunities
from being updated by a non System Administrator profile.
10) How can you refresh a particular section of a visualforce page?
reRender on apex outputpanel
11) What is the difference between Custom Setting and Custom Labels and Custom Object?
12) What is the Difference between Managed Package and Unmanaged package?
Ans Managed Package code cant be edited
13) How do we capture the user Data in VisualForce page?
14) What are the different Annotations in Salesforce and tell me with examples?
@isTest,@TestVisible,@Override @testsetup,@future, @AuraEnabled
● @Deprecated,@ReadOnly
● @InvocableMethod
● @InvocableVariable
15) What is a difference between System log and debug log?
System log includes all workflow,apex ,workflow debug log include dat in System.debug
16) How to undeployed from deployed items?
17) Difference between import wizard vs dataloader?
18) Describe about the SOQL injection?
19) What is the difference between 15 and 18 Digit ID ?
Case sensitive
20) What is dynamic pick list?
21) Difference between datatable
vs page block table in visualforce page?
● PageBlockTable should be define inside pageblock or pageblocksection.
● PageBlockTable uses standard styles sheets to design a visualpage.
● It has the required attribute “value”.
● Column headers will be displayed automatically.
● No need to write inside pageblock or pageblocksection.
● There is no required value.
● The data can be displayed using custom style sheets.
● we need to specify column headers explicitly.
22) What is render, rerender, renderas ?
23) Difference b/w isblank and isnull?
Isblank for all fields isnull for number
24) Why do we Use system assert in Test Class?
To check values
25) How can we prevent to cross the governor limit from soql query?
26) What is the difference between Sales Cloud and Service Cloud?
27) What is the stages of Opportunity?
28) What is a Batch Apex?
29) What are the different methods in test Class?
Testsetup testmethod
30) What are the different ways to make a field Mandatory?
31) What are the different ways to Share a record?
Role,profile,manual sharing object__share
32) What is the difference between Salesforce license and License?
33) What are the difference between Render as and Rerender?
34) Why do we use Set, List and Map? give an example for it?
35) Can we create a new User without Role and Profile?
Q1 . Precautions to take to convert Master detail into lookup?
Ans . First we should remove any rollup summary field that may be preset delete from deleted
field also and then convert
How to enable community in salesforce?
Go to community settings and then enable community checkbox
Q2 . What is Postinstall script
Q3.How to add members in community ?
Ans Add basis of Profile,Permission set,Public groups
Q4.create vf page for community
Q5.diff b/w role and profile
Ans. Roles will override the permission of profiles.
When to use permission set & when to use profile
Ans. Permission set are used to extend the permission for a parti
Different types of edition
Change type of fields cautions to take
Ans create new field take backup with dataloader ,massupdate records using script delete
ununused field now
How to create Roll up summary for lookup field
Data loader limitation?
Ans 50k records only can insert
How are picklist values internally stored inside salesforce?
Ans Comma separated
Package versioning sf
Deleting fields in production org
Add value in picklist
Delete standard profiles?
Ans No an only edit standard profile cannot delete
Junction object creation
Using 2 master details
add reporting Indexing for formula fields
Controller, extensions usage
COntroller used for custom functionality FLS functionailty not repected,extension to override
some functionality and some to use standard functionality
Wrapper class?
ANs used for relating unrelated data to show on a page
Page block table apex repeat diff diff and how
Different between sf platform and java platform
How is sandbox refreshed
Ans. In the prod. Env. on profile you must have manage sandbox permission checkbox checked. If
you have that permission the from setup you can search for sandbox and the you will see list of
sandbox with that prod. By clicking on refresh link you can refresh it.
Time taken for sandbox refreshing
Ans partial 7 days full 29 days
Security model of sfdc, layers
Types of deployment change set,eclipse ant in which we scenario prefer to remove a field
Can we remove existing field in production?

About the Author: devender kumar

java/j2EE developer

Comments are closed.