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
s2pid_fs2pid_f 

AJAX toolkit

Can we use the salesforce AJAX toolkit with visualforce pages deployed on Sites?

 

please let me know

 

thanks

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent

Sites public access doesn't have a session id so you won't be able to call API from the toolkit.

You need use visualforce page technology rather than ajax toolkit 

All Answers

BulentBulent

Sites public access doesn't have a session id so you won't be able to call API from the toolkit.

You need use visualforce page technology rather than ajax toolkit 

This was selected as the best answer
s2pid_fs2pid_f

thanks for your response. Will I be able to use the toolkit if my site is integrated with a customer portal?

 

 

 

BulentBulent
I would still recommend using visualforce, scontrols are not the way to go. However, once you authenticate users with portal they are portal users with session ids, so technically you can use the toolkit.