• dhead
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi there,

 

I have an error popping up saying " missing ; befor statement ".

I've looked at it several times but can't seem to find where is the missing ";" (semicolon) should be.

 

	{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}

var result = sforce.connection.query("Select Id From Event where subject = 'Tour' and whoid = '{!Lead.Id}' ");
var records = result.getArray("records");

if (records.length == 0){
window.navigate("https://tapp0.salesforce.com/00U/e?who_id={!Lead.Id}&evt1_lkid=005A0000000IHh8&evt1=Philip+jones&evt5=Tour&evt12=Morgan_Ave&IsReminderSet=1&retURL=%2F{!Lead.Id}");
}
Else{
alert ("There is already a Tour Scheduled for this Lead. Please update the existing Scheduled Tour.");
}

 Thanks for the help!