You need to sign in to do that
Don't have an account?
SFDC Learning
Problem in custom button to call apex method
Here is my button code:
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var result = sforce.apex.execute("SendAccountUsingRESTAPI","callgetContact",{IDD:"{!
Account.Id}"});
APex class which i m calling:
Global class SendAccountUsingRESTAPI {
Global class deserializeResponse
{
public String id;
public String access_token;
}
webservice static void callgetContact(Id IDD)
{ }
}
When i am clicking on button it gives me an error: {faultcode:'soapenv:Client', faultstring:'No operation available for request {http://soap.sforce.com/schemas/package/SendAccountUsingRESTAPI }callgetContact, please check the WSDL for the service.', }"
Thank you in advance!
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var result = sforce.apex.execute("SendAccountUsingRESTAPI","callgetContact",{IDD:"{!
Account.Id}"});
APex class which i m calling:
Global class SendAccountUsingRESTAPI {
Global class deserializeResponse
{
public String id;
public String access_token;
}
webservice static void callgetContact(Id IDD)
{ }
}
When i am clicking on button it gives me an error: {faultcode:'soapenv:Client', faultstring:'No operation available for request {http://soap.sforce.com/schemas/package/SendAccountUsingRESTAPI }callgetContact, please check the WSDL for the service.', }"
Thank you in advance!
I tried your button and apex in my DE org and it works well. Do you have a namespace in your org? If the namespace of the org is "abc", try the following: