+ 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