-
-
Save sbob-sfdc/3605659 to your computer and use it in GitHub Desktop.
I used the complete code above and getting "No operation available for request {http://soap.sforce.com/schemas/package/InvoiceUtilities}renumberLineItems, please check the WSDL for the service" Any suggestions? Thanks.
Typo on my part and slightly different from above. Lowercase i in invoiceName.
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{invoiceName:"{!Invoice__c.Name}"});
alert(result);
window.location.reload();
I'm still getting the response: "please check the WSDL for the service".
What does this even mean?
I'm not a Java person and don't even know where to start to sort this out.
Too bad the workbook is so buggy... :-\
Steve - I have the updated version here: https://gist.github.com/dschach/9c6445c39a5eca6e45d5/16a7926573f789ef1b51cfebefd97fc449c8b9ba
You may wish to update your gist from that.
Well the code that worked for me was this:
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{"invoiceName":"{!Factura__c.Name}"});
alert(result);
window.location.reload();
If somebody need it.
Change the class type from public to global and method signature type from public to webservice
I have used all but not working alll
can you please help in this
In the button code, "InvoiceUtilities" should be "invoiceUtilities" with small i for invoice.
It's should be 'InvoiceName', JavaScript is case-sensitive. The complete codes as follows:
{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{InvoiceName:"{!Invoice__c.Name}"});
alert(result);
window.location.reload();
I use those codes and it works.