Skip to main content
The following code is generating a code error:

 

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

 

    if({!Contract.Status} != 'Approved')

 

{

 

        alert('You cannot sent a contract unless fully approved');

 

}

 

    else

 

{

 

        window.location.href="https://salesforce.com";

 

}

 

}
3 Antworten
  1. 10. März 2014, 17:27
    You just need these 4 lines and nothing else:

     

    if('{!Contract.Status}' != 'Approved')

    alert('You cannot sent a contract unless fully approved');

    else

    window.location.href = "https://salesforce.com";

    B/w out of curiosity - Are you sending this to an Approval Process ? Why not add that Condition to the Initial Filter Criteria ?

0/9000