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
AAKAlanAAKAlan 

Can You Update SalesForce From Remote Application?

I need to upsert() records into a custom SalesForce object from my customer's survey form.
 
I had hoped to use the AJAX toolkit to access SalesForce through JavaScript from my web page.
 
First: is this feasible? Every sample I've read so far uses the tookits from within the SalesForce environment, not from a remote web page.
 
I've written code that seems like it should work, but the sforce.connection object is never created. Of course, all my samples have a local reference to the toolkit file (\soap\version\connection.js), which will not work from my page, since it's not on the same domain as SalesForce.
 
Can I download the AJAX toolkit and run it locally? Can I load the AJAX toolkit remotely using  a fully-qualified URL (if I knew what that URL was)?
 
Or is it simply impossible to update a SalesForce object from a remote web page that's not on the SalesForce.com domain?
 
Color me "lost in space":smileyhappy:
 
Thanks for any help
 
Alan A. Katz
 
SuperfellSuperfell
the browser's same origin policy is not going to let you make ajax http(s) calls to salesforce.com from a page loaded from a different domain. you'd have to do it from service side code. (or look at something like the sites feature)