function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Salesforce 283Salesforce 283 

How to call Batch Class from Custom Button?

Hi Guys,

When i click button in list view page it will call batch class from there batch class call to Apex class. Actually i want to run a Apex class as a Asynchronously. I tried to put @future in Apex Class but it doesn't take return values. So could you please help me out this problem.

Thanks,
Mahesh.

 
SainSain
Hi,

refer below link that may be help you.

http://cloudisfuture.blogspot.in/2012/11/batch-classes-in-salesforce.html

Regards,
sain
Salesforce 283Salesforce 283
Hi Sain, When i click custom button it will call batch apex not apex class. From batch apex, will call apex class 1 from there i passed some return values to another class. Actually the problem is Json: string heap size limit when we retrieve more records from attachment. So I want apex class run as a asynchronously. If apex class run as a asynchronously(heap size limit :12 MB) it may work. Regards, Mahesh.