Reply
Regular Contributor
CarlB
Posts: 30
0

Selecting large number of records for batch processing

I'm trying to figure out of there is any way in Salesforce to allow a user to select a large number of (for example) Contacts such that they can be batch processed as a later time.

 

So far I have tried:

 

1) Using the checkboxes on the list views, but this is limited to 200

 

2) Using the filter id returned by the list view drop down, but there is no obvious way of translating the filter id to a SOQL query, short of calling the metadata api from Apex

 

 

One way I have considered is to duplicate the functionality in the view builder, to allow the user to create a query on Contacts graphically and save the query description in a custom object, but that seems like a lot of work.

 

Is there something obvious I am missing?

 

Thanks,

 

Carl

 

 

 

 

Trusted Contributor
BSridhar
Posts: 279
0

Re: Selecting large number of records for batch processing

Hi,

 

By default batch processing will take only 200 records at a time for processing.

 

Please go through the below URL for more details.

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm

 

Regards,

Sridhar Bonagiri

Regular Contributor
CarlB
Posts: 30
0

Re: Selecting large number of records for batch processing

Thanks for the reply, but you appear to have misunderstood my question.

 

I am looking for some simple way to allow my user to select a large number (1000+) of Contacts and pass that selection to a batch process.  The fact that the batch process then breaks the selection down into batches of 200 is irrelevant.

 

Thanks,

 

Carl

 

Trusted Contributor
BSridhar
Posts: 279
0

Re: Selecting large number of records for batch processing

Hi,

 

Sorry for misunderstanding your query, I think you can not display more thank 1000 items on a VF page.

 

Regards,

Sridhar Bonagiri

Regular Contributor
CarlB
Posts: 30
0

Re: Selecting large number of records for batch processing

Yes, that is why I was hoping to use something like the view id, but there seems to way to use it except in a StandardSetController

 

Regards,

 

Carl

 

Visitor
Lipun
Posts: 1
0

Re: Selecting large number of records for batch processing

[ Edited ]

Step 1: Have one filed like check box which can track whether one recorded is selected or not for batch processing.

 

Step 2:  Go for a custom pagingnation, so that each page can have at best 100 record, provide the check box in UI (Step one check box) so that user can mark and can do a update DML  (pagingnation and check box update DML should be AJAX enable only).

 

Step3: In your batch job query filter those records based on the check box   selection and pass those records batch wise based on your requirements.

 

Note : Dont go for StandardSetController create a custom one.

 

   (If this helps to solve your problem don’t forget to mark it as a solution)