• Peter S. Conrad
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Staff Technical Writer
  • Salesforce.com


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")};

try{
alert('Entering');
var qr = sforce.connection.query("SELECT Id, Quote_Proposal__c, Quote_Proposal__r, Name FROM Sales_Exception__c WHERE Quote_Proposal__r.Id = '" + "{!Apttus_Proposal__Proposal__c.Id}""' ");

var seid = records.getArray('qr');

if (seid[0].Quote_Proposal__r != null)
{
    window.location.href = "/apex/PERScriptQ" + seid[0].id;
} else {

    window.location.href= "/apex/PERScriptQ";
}
}
catch(e){
    alert('An Error has Occurred. Error:' + e);
}


showing a problem with onclick javascript for this button or link was encountered
unexpexted string

Please give me any solution