Please find below the code of Button


var callout = sforce.apex.execute(

if (callout == 'OK') { 
    alert("Your Request is Successful. Click OK and please wait while the page refreshes"); 
else { 
    alert("Request Failed " + callout ); 

Onclick of a button below error in the Image is fired.... Please Help!!!

enter image description here

  • If the below answer addressed your problem, please consider accepting it by clicking on the check mark/tick to the left of the answer, turning it green. This marks the question as resolved to your satisfaction, and awards reputation both to you and the person who answered. If you have >= 15 reputation points, you may also upvote the answer if you wish. There is no obligation to do either.
    – Adrian Larson
    Oct 30, 2017 at 16:33

1 Answer 1


Maybe you don't have a AnalyzeObjectExportCtrl.exportToExcel method...

If you do, check that it is declared as Webservice Static String.

If you have a namespace for this class, you shoud call like this

var callout = sforce.apex.execute(
  • 1
    @Rajesh When you get a moment, please check the on the answer so it can help others find this solution.
    – sfdcfox
    Sep 26, 2017 at 13:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .