Skip to main content
Tweeted twitter.com/#!/StackSalesforce/status/504995179749978112
fixed formatting
Source Link
pchittum
  • 19.8k
  • 5
  • 57
  • 99

i have one Ajax custom button {!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} alert("k"); sforce.apex.execute("Account_chk","method1",{i:"{!Account.Id}"});that

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 
alert("k"); 
sforce.apex.execute("Account_chk","method1",{i:"{!Account.Id}"});

that callsAccount_chkclass public class Account_chk { public void method1(Id i) { Account a=[select Id2_vod__c from Account where id = :i]; a.Id2_vod__c= 'kkkk'; update a; } }errors

public class Account_chk {
  public void method1(Id i) {
    Account a=[select Id2_vod__c from Account where id = :i];
    a.Id2_vod__c= 'kkkk';
    update a;
  }
}

errors out{faultcode:'soapenv:Client',faultstring:'No operation available for request{http://soap.sforce.com/schemas/ package/Account_chk}method1, please check the WSDL for the service.',}.please

{faultcode:'soapenv:Client',faultstring:'No operation available for request{http://soap.sforce.com/schemas/package/Account_chk}method1, please check the WSDL for the service.',}

please help

i have one Ajax custom button {!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} alert("k"); sforce.apex.execute("Account_chk","method1",{i:"{!Account.Id}"});that callsAccount_chkclass public class Account_chk { public void method1(Id i) { Account a=[select Id2_vod__c from Account where id = :i]; a.Id2_vod__c= 'kkkk'; update a; } }errors out{faultcode:'soapenv:Client',faultstring:'No operation available for request{http://soap.sforce.com/schemas/ package/Account_chk}method1, please check the WSDL for the service.',}.please help

i have one Ajax custom button

{!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 
alert("k"); 
sforce.apex.execute("Account_chk","method1",{i:"{!Account.Id}"});

that callsAccount_chkclass

public class Account_chk {
  public void method1(Id i) {
    Account a=[select Id2_vod__c from Account where id = :i];
    a.Id2_vod__c= 'kkkk';
    update a;
  }
}

errors out

{faultcode:'soapenv:Client',faultstring:'No operation available for request{http://soap.sforce.com/schemas/package/Account_chk}method1, please check the WSDL for the service.',}

please help

Source Link
Testing_SFDC
  • 3k
  • 10
  • 64
  • 144

Ajax custom button calling apex method errors out

i have one Ajax custom button {!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} alert("k"); sforce.apex.execute("Account_chk","method1",{i:"{!Account.Id}"});that callsAccount_chkclass public class Account_chk { public void method1(Id i) { Account a=[select Id2_vod__c from Account where id = :i]; a.Id2_vod__c= 'kkkk'; update a; } }errors out{faultcode:'soapenv:Client',faultstring:'No operation available for request{http://soap.sforce.com/schemas/ package/Account_chk}method1, please check the WSDL for the service.',}.please help