You need to sign in to do that
Don't have an account?
Praveen kumar Tammali
Insert records using Batch Apex
Hi All,
How to insert records using batch apex.There is lot of information given to update the existing records.
but i want only isert records
Thanks
Praveen
How to insert records using batch apex.There is lot of information given to update the existing records.
but i want only isert records
Thanks
Praveen
You can write test class for your Batch apex in following ways:
Please let me know if you need any additional help.
Cheers,
Dhriti
Look at the Iterable implementation of Batch Apex (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm) as I think that is what you want. You can use a private List<sObject> or specify your type, then create a constructor that receives a list that it sets to the private one. In your start() method, return the private list.
I hope that helps.
P.S. please forgive any type-o's as I didn't run this in SF, just typed here directly. Therefore, please use this just as a template for understanding the concept.