Hyperlinks that call S-Controls break when you switch to Ajax toolkit 8+

Salesforce.com made some changes in API around session management when it revamped the Ajax toolkit. If you’re creating hyperlink fields that call Salesforce S-Controls, they will fail with an invalid session Id error if you upgrade the S-Controls to the new Ajax toolkit.

To comply with their new way of doing things, you need to add &ic=1 to the end of your hyperlink to get the code to fire. Here’s a thread where Doug Chasman describes the problem.

I recently upgraded some old code to the new Ajax toolkit to take advantage of the speed improvements and relationship queries. A user reported a problem yesterday and it turned out to be that they were using the hyperlink button approach and it was failing.

The real answer to this is to call S-Controls from real buttons, and stop using fake hyperlink buttons.

Leave a Reply