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
alexannnicalexannnic 

As of this morning SForceClient.js is not available, S-Controls not working!

Hello,
As of this morning, almost all S-Controls in our Salesforce implementation have stopped functioning. For the past ~6years, we have been loading "http://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" API to perform simple records manipulation, such as copying Account details to a new Opportunity  etc. The error we're getting when we try to run a page that includes the above reference to the old Sforceclient.js link is a 404 - not found error.

I am aware that the S-Controls have been deprecated but until yesterday afternoon we were able to load the old SforceClient js API.

- Is anyone aware of any changes that happened yesterday to this API or to S-Controls?
- Is any temporary workaround that we can do to temporarily continue functioning? Our Sales team has a major operational issue as a result of this change.

I'd appreciate any help,

Thanks, Alex

Greg HGreg H
That is the beta version of the AJAX toolkit. It is very old. I don't believe I've seen a reference to it since 2006 / 2007.

I recommend using a non beta version of the AJAX toolkit. Since the toolkit is updated with each Salesforce release you may be forced to use an older version. Something like this may work:
<script src="/soap/ajax/10.0/connection.js" type="text/javascript"></script><!-- AJAX Toolkit version 10.0 -->
Simply swap out the numeric reference to the version number to reference the various API releases. For example, change the 10.0 to 37.0 and you will be using the 37.0 version of the API with the toolkit.

Of course that may take some trial and error to make work but it should get you pointed in the right direction.

Also, at some point in the AJAX toolkit lifecycle it became necessary to declare the session within your JavaScript. so if you are messing with the API version within the script src from above and you cannot connect to the API then you may need the following:
<script language="JavaScript" type="text/javascript">
sforce.connection.sessionId = "{!$Api.Session_ID}"; //session
</script>

Good luck.
-greg