function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Engine ForceEngine Force 

connection.js and apex.js not working in winter 12

The javascript code on a list button below no longer works in winter 12.

 

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

alert("hello");

 

 

Do you have similar issues?

Best Answer chosen by Admin (Salesforce Developers) 
kpeterskpeters

We had this same issue with Winter '12 upgrade.  The workaround we found is to import the AJAX toolkit libraries (connection.js and apex.js) in a top level detail button, but do not import them in the related list buttons on the same page (even if these buttons use the AJAX toolkit libraries).  Then, it worked for us.

All Answers

kpeterskpeters

We had this same issue with Winter '12 upgrade.  The workaround we found is to import the AJAX toolkit libraries (connection.js and apex.js) in a top level detail button, but do not import them in the related list buttons on the same page (even if these buttons use the AJAX toolkit libraries).  Then, it worked for us.

This was selected as the best answer
Engine ForceEngine Force

Thanks! It worked.

kpeterskpeters

Hmm, this doesn't seem to work for IE though (works for Chrome and Firefox).  Anyone have any ideas?