1

Hi I am getting this error

Chrome - 'Unexpected token {'

Mozilla - 'missing ; before statement'

when clicking on a button, couldn't understand where I am going wrong. Please review my code below and guide me accordingly.


{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}
{!REQUIRESCRIPT("/support/console/31.0/integration.js")}

var CamId = '{!JSENCODE(Campaign.Id)}';

var result = sforce.apex.execute("CrtWlcomCallCampaign","welcomeCalls",{parentId:CamId});
sforce.debug.trace=true;

alert{'Welcome call campaign is initiated'}; 

here method welcomeCalls returns void.

Thanks in advance.

3

Instead of this:

alert{'Welcome call campaign is initiated'};

you need:

alert('Welcome call campaign is initiated');
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.