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

Invoke Method from custom button


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

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

User-added image

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