accessing ajax toolkit outside salesforce

saad999

New Member
I have a simple html page in my system. I am trying to access my org details using the ajax toolkit. But I am unable to do so. Any idea how can I access salesforce data in a simple html page in my system using javascript/ jquery??\[code\]<html><script type="text/javascript" src="http://stackoverflow.com/questions/13727858/jquery.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/13727858/connection.js"></script><script type="text/javascript" src="http://stackoverflow.com/questions/13727858/apex.js"></script><script type="text/javascript">var j$ = jQuery.noConflict();sforce.connection.init('sessionId', 'https://ap1.salesforce.com/services/Soap/u/26.0');j$(document).ready(function(){ var result = sforce.connection.query("Select Name, Id from User"); var records = result.getArray("records"); for (var i=0; i< records.length; i++) { var record = records; console.log(record.Name + " -- " + record.Id); }});</script></html>\[/code\]
 
Back
Top