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
r_boyd_848r_boyd_848 

custom buttons using Javascript fail on Salesforce Communities

We've been developing some functionality for a client that was orginally intended for Customer Portal but will now be going out on Salesforce Communties. We set up Communties on dev org and quickly discovered that custom buttons running javascript break if they reference libraries; including SF connection.js. We get a 404 not found error for connection.js.

 

The button works on Internal view but when the users switches to the portal it breaks.

 

Javascript using the same Ajax Toolkit library, JQuery etc running on a VF page works fine

 

Example:

 

Custom Button that contains this reference {!REQUIRESCRIPT('/soap/ajax/26.0/connection.js')} works in internal mode but gives a 404 externally. The library isn't the issue, Jquery libraries even saved as a static resource fail

 

I would appreciate some assistance on this

Vinita_SFDCVinita_SFDC

Hello,

 

As of now AJAX API is not supported on communities that is why you are getting this error.

 

Refer: http://help.salesforce.com/help/doc/en/salesforce_portal_to_community_migration_cheatsheet.pdf

 

Please post idea on ideaexchange to support Ajax Api in near future release at: https://success.salesforce.com/ideaSearch

Fabrice TalbotFabrice Talbot

AJAX API support is coming in Winter'14 (safe harbor).