nonprofitCRM.org is produced by members of the NPSF (nonprofit salesforce.com) community. We are Salesforce.com administrators and consultants working to help nonprofits understand, better use and leverage Salesforce.com for their organizations. Read More
I posted recently about Batch Apex, which I used to solve an interesting problem for data summary across lots of records. That code was working great before Winter 10 was released – unfortunately, Batch Apex is no longer working properly since the update. See this discussion for information on the problems people are encountering. The basic issue is that if your query is complex or returns a large number of records (the whole point of batch apex), it fails. I some cases you get an error, in others the query simply returns no records and reports that it was successful at running 0 batches.
If you were thinking of using Batch Apex in your own code, you will want to wait until they have a chance to iron out the bugs. I have submitted a case to support, and will post here when I learn more.
UPDATE 10/30: A release came out this week that appears to have fixed the issue of large queries. I haven’t had a chance to test all our use cases, but it looks promising.
Evan, Any word from sf.com on this?
Hi Sonny! The case has been escalated, but no word – and large queries are still not working.
Thought I’d mention this to anybody who hasn’t noticed yet, it looks like there are issue with Batch Apex again, this time in the test methods, here’s the dev-boards thread:
http://community.salesforce.com/sforce/board/message?board.id=apex&thread.id=23622
Almost certainly a problem with test methods and possibly asynch data creation in test methods??? Not sure if the error message is random or related, but definitely consistent. Has anybody in the NPO world run into this issue? (FYI, for me, it was trying to deploy a class from sandbox to prod, with batch apex in prod running the tests. Finally got around it by *gulp* commenting out the test methods, and banking on enough coverage elsewhere. Tripped from both the IDE and the new intra-sf deployment setup)
Name (required)
Mail (will not be published) (required)
Website