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.

1 Answer 1

3

Instead of this:

alert{'Welcome call campaign is initiated'};

you need:

alert('Welcome call campaign is initiated');
0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.