Skip to content

Instantly share code, notes, and snippets.

@srujan21
Forked from sbob-sfdc/custombutton.cls
Created November 22, 2016 15:12
Show Gist options
  • Save srujan21/9d01b01bd4c025f738ab5a60936232dc to your computer and use it in GitHub Desktop.
Save srujan21/9d01b01bd4c025f738ab5a60936232dc to your computer and use it in GitHub Desktop.
Workshop 201, Tutorial 4, Step 1, Apex
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{invoice:"{!Invoice__c.Name}"});
alert(result);
window.location.reload();
@srujan21
Copy link
Author

This is to call apex class method from custom button JavaScript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment