You need to sign in to do that
Don't have an account?
Nag Raj 32
How to call a normal apex class from a custom button ?
Hi,
I want to call normal apex class, from a custom button in the account detail page.
Thanks in advance.
Raj.
I want to call normal apex class, from a custom button in the account detail page.
Thanks in advance.
Raj.
Option 1 :
Create visualforce page with standard controller and extension as your code
Then create a button
Add the button to the page layout
Code
Option 2 :
Create an apex class
Call it from the javascript button
To invoke Apex through anonymous blocks or public webservice methods, include the following lines in your AJAX code:
Refer this link for more info
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_and_ajax.htm