You need to sign in to do that
Don't have an account?
BBeaird
Javascript remote call from standard page
Is there a way to do Javascript remoting from a button on a standard page? Or some way to get the same result with a different method? Basically, I need a button that users can press to kick off a function in another class.
YOu have to add javascipt library file. I am unable to post the script code here.
Please try adding it from the link
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_and_ajax.htm
All Answers
You can call Apex Class from javascript. You have to use AJAX for it.
try something like
sforce.apex.execute("ApexClassName","methodName",{});
where first argument is apex class name, second is method name and the last one in parameters.
does it make sense ?
I tried that originally but am still getting "sforce not defined." Is there something I have to do externally to include additional javascript files for this?
YOu have to add javascipt library file. I am unable to post the script code here.
Please try adding it from the link
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_and_ajax.htm
I fixed the problem; the button is calling the webservice now. I actually had that tag in already, but it did not make a difference. I'm not sure exactly what fixed it, but I think it was a typo or something in my javascript that called the class. It's too bad the error message can't be more specific.