-
-
Save sbob-sfdc/3605659 to your computer and use it in GitHub Desktop.
I don't know how you found that, but I have been stuck on that issue for 2 days!
Thank you so much you rock!!!!
Did this work for you guys.? as even on changing line "invoice" to "invoiceName", i still got an error related to SOAP WSDL error? Any idea where i could be going wrong.
and am non java person,so what would you suggest, how should i learn onclick javascript execution from SF. Thanks
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.
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.
Hi, I found a mistake ! The piece of code you distribute on this page is not corresponding with the force.com workbook. The third line parameter 'invoice' should be 'invoiceName'.