Nripesh Kumar Joshi
Salesforce Developer Interview Questions
Apex
1. What is 101 error in Apex?
2. What is the design Pattern?
3. What is the difference between Future and Queuable Apex?
4. If we are updating a record 1000 in a batch and the batch failed, what
can be the reasons?
5. Why cannot we pass the sobjects in the future method? Explain the
reason?
6. How many methods are there in batch apex?
7. What are the different interfaces in batch apex? Please tell me about
[Link] interface.
8. How can we make a callout from batch class? Which interface is
required to make a callout?
9. How can we make a callout from a future method? Which interface is
required to make a callout?
10. Can we make a callout in the trigger?
11. What is the context variable? Why context variables are
required in apex trigger?
12. What is the difference between before and after trigger? When
do we use before and after trigger?
13. Can we call batch from batch ? If No, then why?
14. Can we call queueable from batch? If No, then why?
15. Can we call the future from the future? If No, then why?
16. Can we call a batch from the future? If No, then why?
17. Can we call the future from an apex trigger? If No, then why?
18. Can we call the future from batch? If No, then why?
19. What is the default batch size?
20. What is the maximum batch size?
21. What are the best practices of Test Class?
22. What are the best practices of apex trigger?
23. What are the governor limits for async and sync apex ?
24. Suppose we want to count the success record and failure record and
send it through mail then how can we do this?
25. Can we write a batch class without a finish method?
SOQL And Apex Trigger
1. Difference between SOQL and SOSL
2. Write the soql queries:
Query 1: Suppose there are two object Teacher__c(Parent) and
Student__c(Child)
● child to parent query for above scenario
● parent to child query for above scenario
Query 2: Suppose there are two object Account and Contact
● Child to Parent for above scenario
● Parent to Child for above scenario
Query 3: Fetch the latest opportunities
Query 4: Fetch total count of opportunities
Query 5: Fetch the account which has more than 2 contacts
Query 6: Find the duplicate accounts by name
Query 7: Find the second largest salary of Employee
Query 8: Find the contacts which have been created in the last 90 days
Query 9: Fetch the accounts which has more than 5 contacts using soql
Query 10: Write the trigger to prevent the deletion of the account if it has
related contacts.
Write the trigger -
● Scenario 1: Count the related contact of an account if contact is
inserted, deleted, updated and undeleted.
● Scenario 2: Whenever an account is created contact should be
created.
● Scenario 3: Suppose there is a field No_Of_Location on Account. If
we enter any number on this field then contact should be created.
Suppose we enter 3 then 3 contact records should be created.
● Scenario 4: Duplicate Account should not be created.
● Scenario 5: Prevent an Account from being inserted if Status__c is
set to 'Not Active'.
Prevent the Status__c field from being changed from 'Active' to 'Not
Active' if the Account has any open Opportunities (i.e., Opportunities
not in 'Closed Won' or 'Closed Lost' stage)
LWC
1. What are the decorators in lwc?
2. What is the life cycle hook in lwc? Explain each method.
3. How can we fetch the data with the help of a wire method?
4. What is an imperative call in lwc?
5. What is the difference between renderedCallbak and
connectedCallback?
6. How many times does renderedCallback get executed?
7. How many times does connectedCallback get executed?
8. When does the wire method call?
[Link] are two components A(Parent) and B(Child) then
how can we send the data from parent to child?
[Link] are two components A(Parent) and B(Child) then
How can we send the data from child to parent?
[Link] are two components both are unrelated then how can we
send the data from one component to another component?
12. There are three components A, B and C. B and C are related to
each other and we need to communicate C to A then how can we do
this?
13. How can we achieve the pagination functionality in lwc?
14. Can we call the lwc component from flow?
Integration
1. Can you tell me about the REST API?
2. What are the different methods in the REST API?
3. What is the difference between Put and Patch method?
4. Which type of integration have you done? Inbound and Outbound
integration?
5. Can you tell me different ways of authorisation in integration?
6. What are the steps of integration you have done in your project?
If you have done outbound/inbound integration then tell me the steps.
7. What is a connected app and how can this help in integration?
8. What is a named credential?
9. OAuth 2.O vs JWT Token
10. What is a restful Resource? Tell me the different types of method
available?
11. What is composite api?
12. Tell me about platform events.
13. Are you aware of different types of status code(401,402,403,404,500
etc) in api?
14. Are you aware of Webhook?
15. What is a remote site setting?
Admin
1. How many types of relationships are available in Salesforce? Explain
each relationship.
2. What is the rollup summary field?
3. Can we convert master-detail relationship to lookup relationship? If
yes, then how?
4. Can we convert the lookup relationship to master-detail relationship?
If yes, then how?
5. How many lookup relationships can we create on an object?
6. How many master relationships can we create on an object?
7. Can we create a Rollup summary field in lookup?
8. What is a report and tell me the different types of report?
9. What is a dashboard? Tell me the difference between static and
dynamic dashboard.
10. What is the security model?
12. What are the different ways of sharing records ?
13. What is the sharing rule and tell me the types of sharing rule?
14. Tell me the difference between a queue and public group.
15. Tell me the different types of flow.
16. Tell me the use cases of each flow.
17. Can we send the email from flow?
18. When do we use an apex trigger or flow?
19. Can we call screen flow from lwc?
20. How can we check the debug log in flow?
21. What are governor limits and why these limits are provided by
Salesforce?