+ Start a Discussion
Shamus Kelley 4Shamus Kelley 4 

Why would the Winter '15 release cause issue with preexisting code?

Hello - We expereinced an issue yesterday with a few of our OnClick Java buttons, which seemiling were related to the Winter 15 release for our Instance (NA1). I'm curious as to why preexisting code would have been affected. I'm not a developer but we were able to resolve with a few lines. I'm just curious as to what new upgrade caused this and how I could have been made aware of it before the issue came about. 

Old Code:
try{
    var result = sforce.apex.execute(
        'Opportunity_Buttons', // class name
        'createQuote', // method name
        { // arguments
            oppIDraw:"{!Opportunity.Id}",
            generateQuoteNum:"false"
        }
    );
    
    if (result[0].success == 'true') {
        // window.location = result[0].msg;
        window.open(result[0].msg, "quoteWin");
    } else alert(result[0].msg);
}
catch(ex){
    alert("Error: "+ex);
}


Updated Code:
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/21.0/apex.js")}

try{
    var result = sforce.apex.execute(
        'Opportunity_Buttons', // class name
        'createQuote', // method name
        { // arguments
            oppIDraw:"{!Opportunity.Id}",
            generateQuoteNum:"false"
        }
    );
    
    if (result[0].success == 'true') {
        // window.location = result[0].msg;
        window.open(result[0].msg, "quoteWin");
    } else alert(result[0].msg);
}
catch(ex){
    alert("Error: "+ex);
}

thank you in advance! 
Gordon EngelGordon Engel
I think this was fixed in a patch last night.  Can you try reverting your change to confirm?