Asynchronous Apex Questions
Batch Apex
1. What is batch apex?
2. What are the governing limits?
3. What is interface?
4. What is [Link] Interface.
5. What all the methods we have in this interface
6. What is Iterable Interface?
7. What is [Link] ?
8. What is the purpose of start method ?
9. What is [Link] ?
10. What is execute method?
11. How many times the execute is called
12. What all the parameters we have in execute
13. Can we call future method in the execute
14. Can we call email program in batch?
15. Can we call callouts in the execute
16. What is finish method?
17. Can we call future in the finish?
18. Can we call callouts in finish?
19. Can call another batch in finish?
20. What is batch serialization?
21. Can we declare the future method in batch apex?
22. What is [Link]?
23. How many batch jobs can be added at a time?
24. What all the best practices you have followed in batch apex
25. How to write a test class for batch apex
26. What is [Link]() ,[Link]();
27. Accoring to spring 15 any update in the batch (flex concpet)
28. Give me some better scenario you have implemented in your Project and
why you have chosen batch for this
29. What is the default size of the batch?
30. What is the maximum and minimum size of the batch?
31. What is the maximum no of records that can be fetched using Batch start
method.
32. How many callouts can be called from each batch apex?
33. What is AsyncApexJob?
Best practices
1. Governing limits need to be obeyed
2. In case if any governing limits issues are encountered we have to reduce the
size of the batch
3. If every execute we can have only 10 callouts so if we encounter this we can
resoled by Reducing the size of the batch
Scenario’s:
1. Montly commission calculation for the agents and sales executies? based on
the Opportunities that have closed from 25 to 25 of the month
2. Fetch the list of medicines which are going to expire in a month and generate
a email to the corresponding vendors intimating for refund;
3. Create a batch apex to reassign all the records which are owned by the user
to his reporting manger before deactivating the user. batch with trigger
4. We have a scenario where roles of the users will be changing for every 15
days, users are assigned with permissions sets based on his role. So we have
implemented with batch
Schedule Apex
1. What is schedule Apex?
2. What is schedulable interface?
3. What are the methods in schedulable interface?
4. What is schedulableContext?
5. What is cronTrigger?
6. What to know the status and next schedule of Job that is schedule?
7. What is cronExpression?
8. What is [Link]();
9. Can we call callouts from schedule?
10 .Can we call future methods from Schedule Apex?
11. Call we call batch apex from Schedule Apex?
12. Can we manually schedule the apex class?
13. What are the governing limits of Schedule Apex
14. Good Practices that you have followed?
15. Tell me one best scenario that you have implemented using schedule apex
and you have preferred apex schedule than manual schedule?