Simple AJAX in Salesforce
Scenario: The relationship between Member and Interests is Master Detail. One member can have multiple interests. Check Valid Interests button will say whether any interest under the Member is active ....
Scenario: The relationship between Member and Interests is Master Detail. One member can have multiple interests. Check Valid Interests button will say whether any interest under the Member is active ....
The AJAX toolkit includes built-in support for invoking Apex through anonymous blocks or public webService methods. To do so, include the following lines in your AJAX code: <script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script> ....
To call Apex method from Custom Button, follow the below steps 1. Create a custom button and enter the following code Syntax: {!REQUIRESCRIPT("/soap/ajax/12.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/12.0/apex.js")} sforce.apex.execute("Class_Name","Method_Name",{parameter_Name:"value"}); location.reload(true); Code: {!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")} var ....