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
TiborMTiborM 

How to run class without scheduler?

Hi,

 

I want run some method from class by pressing the button (List view button).

 

Could anyone paste me here sample of code which run my own method "CriticalAccountAgeOfOpenCases.Recalculate()" ?

 

Could you please paste me here sample of code for list view button how to run theese 2 lines?

CriticalAccountAgeOfOpenCases GetCases = new CriticalAccountAgeOfOpenCases();
ID batchprocessid = Database.executeBatch(GetCases, 90);

 Coul you please link me some documentation where it is described how to create code like above?

 

 Thank you

iBr0theriBr0ther

You may use  webservice method to run your class from that button:

 

http://www.salesforce.com/us/developer/docs/apexcode180/Content/apex_and_ajax.htm

 

Cheers,