apex code - Add button to existing standardController page SalesForce -


i want add button existing salesforce object page has standardcontroller , page built salesforce.
have utility class want call function button on object.

currently, have seen ways of doing webservice, included code snippets below. thinking there has way, due fact want reuse code in other places not require webservice, , want avoid writing 2 procedures same thing. know use wrapper guess, want see if there way of adding button more in line new salesforce way of visualpages, , not s-controls/web services.

so, when add button on salesforce page going setup-->create-->objects scroll down add button, requires button scontrol or javascript. found technique

apex code:   global class class1{ webservice static integer method1(string ititle){   logic here  }  }   custom button code:  {!requirescript("/soap/ajax/14.0/connection.js")} {!requirescript("/soap/ajax/14.0/apex.js")}   var result = sforce.apex.execute("class1", "method1",{ititle : notetitle});  


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -