+ Start a Discussion
mohit Srivastavamohit Srivastava 

I want to move data from one org to other org ?

Hi all , 

I have a requirement to move data from one salesforce org to other Salesforce orgi want to do it via batch class but problem is that it can hit the limit of call-out. Please help me in finding a way so that I can fetch data from other org via batch call

You could use the following Apex code snippet to set the scope parameter of the batch job which governs the number of records being processed in the execute method of the batch job.
BatchProcessClass bpInstance = new BatchProcessClass ();
ID batchprocessid = Database.executeBatch(bpInstance, 15);
The code assumes the name of the BatchClass to be BatchProcessClass. You can replace it with your respective class name. The minimum value you can set the scope parameter to is 1. Please fine tune the scope value based on your needs.

Hope this helps.

Please do not forget to mark this thread as SOLVED and the answer as the BEST ANSWER if it helps you resolve your issue.