In Apex class:
@RemoteAction global static List<Account> getAccounts() { //your code }In JS method:
function getAllAccount(){ // call method from saleforce class Visualforce.remoting.Manager.invokeAction( '{!$RemoteAction.OfficeLocatorController.getAccounts}', function(responseAccounts, event){ initialize(responseAccounts) },{escape: true} ); }
No comments:
Post a Comment