function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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