You need to sign in to do that
Don't have an account?
James_Adapx
button error
Here is the entire error
"A problem with the OnClick JavaScript for this button or link was encountered:
{faultcode:'soapenv:client',faultstring: ' No operation available for request
{http://soap.sforce.com/schemas/package/sumTotal}getTotal, please check the WSDL for the service.',}"
I am trying to call a class from a button and passing in a parameter like this:
The javaScript:
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
var opt1 = "{!Opportunity.Id}";
var accts = sforce.apex.execute("sumTotal","getTotal", {opt:opt1});
the class I am calling looks like this.
"A problem with the OnClick JavaScript for this button or link was encountered:
{faultcode:'soapenv:client',faultstring: ' No operation available for request
{http://soap.sforce.com/schemas/package/sumTotal}getTotal, please check the WSDL for the service.',}"
I am trying to call a class from a button and passing in a parameter like this:
The javaScript:
{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}
var opt1 = "{!Opportunity.Id}";
var accts = sforce.apex.execute("sumTotal","getTotal", {opt:opt1});
the class I am calling looks like this.
public class sumTotal{
public static double getTotal(Opportunity opt){
}}
werewolf
You have neglected to make your Apex class a webService so it's unavailable to your javascript. That's the problem.
James_Adapx
Thank YOU!