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
Gaurav PathakGaurav Pathak 

Ajax Toolkit is not Working

Hi All,
 
   Well I am trying to use Ajax to  upload IMAGE from salesforce site using "soap/ajax/31.0/connection.js", But i got this error can someone clear me wether i am wrong.
Or can someone please tell me how to upload 4MB image from SFDC Site using JS.

User-added image
Thanks!!!
James LoghryJames Loghry
Gaurav,

Looks like the running user doesn't have API permissions.  Try going to their profile and checking the "API Enabled" checkbox, or creating a separate integration user that has the API enabled permission.
Gaurav PathakGaurav Pathak
Hi James,

Thank you so much for your help! My user profile(site guest user) already has the API enabled permission. Still getting the same error. Please let me know if there is any other step that I am missing.

Thanks!!!
Jack SanfordJack Sanford
Apparently AJAX Toolkit doesn't work in Sites and Communities. See https://developer.salesforce.com/forums/?id=906F00000009sd2IAA