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
Varshini DVarshini D 

Queueable Apex Through custom Button

Hi,

I have an scenario where I want to call queueable apex when I click an custom button. How to create custom button to call queueable apex.
I called it through the VF page and it works. Is there any way to call a queueable apex directly through custom button.

Please help me to call a queueable apex through custom button.

Thanks In Advance.
 
Best Answer chosen by Varshini D
VinayVinay (Salesforce Developers) 
Hi Varshini,

You can call queueable method from the command button.

Review below links which can help you.

https://salesforce.stackexchange.com/questions/309765/how-to-call-queueable-apex-method-from-visualforce-page-commandbutton
https://www.infallibletechie.com/2016/08/queueable-apex.html

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar