Unanswered: Connecting Salesforce.com from a Sencha or ExtJS App??
Unanswered: Connecting Salesforce.com from a Sencha or ExtJS App??
To SenchaTeam,
I have been hitting my head all around to connect to a Salesforce.com instance from within a Sencha 2.0 App. I tried using the following 2 approaches
1. SF AjaxToolkit : http://www.salesforce.com/us/developer/docs/ajax/Content/sforce_api_ajax_introducing.htm Here i tried using both 'sforce.connection.login( )' and 'sforce.connection.remoteFunction( )'
While the 1st approache throws a "Cross Domain" exception, the second one requires hosting of Proxy.php used to route the REST API Calls again to avoid "Cross Domain" issue.
I am intending to build a Sencha Touch2.0 Mobile App, so i may not be able to host a local proxy.php within the Mobile container (please correct me if my understanding is wrong).
Can you please guide me with a workaround or approach to connect to Salesforce.com with either of the above 2 approaches? Anything else which can help me authenticate the Salesforce instance and query data from the same would be Welcome.
Regards,
CP
Last edited by developer-greenova; 14 May 2012 at 7:46 PM.
Reason: Need to add some more details
If you are getting a cross origin error then the server doesn't support CORS. You have 3 choices, have the server support CORS (which you don't have control over), have the server support JSONP (which the server may not) or have your own server side code that won't have cross origin issues.