• David Walshe
  • NEWBIE
  • 10 Points
  • Member since 2014

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

I am trying to a button using Javascript which uses a variable determined by whether the user has selected either standard or premium support.
However, I keep getting "Unexpected token ;". Any help is appreciated. 

Here is the script I am using:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}

var cost;

if ({!ISPICKVAL(Quote.S_W_Support_Level__c , 'Premium')}) { 
cost = {!Quote.S_W_Premium_Maintenance__c};
} else {
cost = {!Quote.S_W_Standard_Maintenance__c};
Hi,

I am trying to a button using Javascript which uses a variable determined by whether the user has selected either standard or premium support.
However, I keep getting "Unexpected token ;". Any help is appreciated. 

Here is the script I am using:

{!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")} 
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")}

var cost;

if ({!ISPICKVAL(Quote.S_W_Support_Level__c , 'Premium')}) { 
cost = {!Quote.S_W_Premium_Maintenance__c};
} else {
cost = {!Quote.S_W_Standard_Maintenance__c};