You need to sign in to do that
Don't have an account?
michaelforce
The AJAX Toolkit and SANDBOX edition
Is it possible at this point to use the AJAX toolkit in the sandbox? I've tried simply logging in as follows and it doesn't work... any ideas?
Code:
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script> <script type="text/javascript"> sforceClient.setLoginUrl('https://test.salesforce.com'); var loginresult = sforceClient.Login("sandbox_username","sandbox_password"); sforceClient.setUrl(loginresult.serverURL); alert(loginresult.sessionID); </script>
milliskenny
I haven't tried AJAX from outside SFDC, but you may have to use the server name (ie: https://tapp0.salesforce.com) instead of the main login page (https://test.salesforce.com) for the authentication.
I'm using AJAX inside the sandbox and it works fine, but the user is already authenticated.
Just an idea...Good luck