You need to sign in to do that
Don't have an account?

List view button to call controller method
Hi,
My requirement is
1)Need to add abutton to Account list view page say ex:'Process Selected'
2)Whenever I select the list of records and click 'Process Selected' , It should peform contoller action and should not redirect to any other page.
3)What type of button should I use and How to call contoller method from List view Button.
4)Only for this button we need to execute controller method for remaining all logic is standard logic only.
Any help is really appreciated
Thanks in advance.

Regards,
Naveen.
My requirement is
1)Need to add abutton to Account list view page say ex:'Process Selected'
2)Whenever I select the list of records and click 'Process Selected' , It should peform contoller action and should not redirect to any other page.
3)What type of button should I use and How to call contoller method from List view Button.
4)Only for this button we need to execute controller method for remaining all logic is standard logic only.
Any help is really appreciated
Thanks in advance.
Regards,
Naveen.
Like here:
http://www.infallibletechie.com/2012/10/calling-apex-method-from-custom-buttom.html
http://blog.shivanathd.com/2014/07/call-apex-class-from-custom-button-salesforce.html
Please see the sample code below
Best Regards
Naga Kiran
Getting below compile error
Pls help me how to proceed..
Regards,
Naveen.
public static List<Account> accnts = new List<Account>();