+ Start a Discussion
ndrannapareddyndrannapareddy 

Invoke Method from custom button

{!REQUIRESCRIPT("/soap/ajax/28.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}

var retStr;
retStr = sforce.apex.execute("SF_Rockport", "callRockport",{ID:"!Transaction__c.Id}"});

alert('The method returned: ' + retStr);

User-added image

vbsvbs
This could be due to one of the following:
1. User's profile not having access to the SF_Rockport class
2. The class being a part of a separate namespace will need to be prefixed accordingly before invocation