You need to sign in to do that
Don't have an account?
falkson
Loging into a Sandbox
Hi,
We've developed applications that connect with salesforce.com without any problem.
I now have a client that needs us to work initially with a sandbox. The URL's we would normally use do not work.
e.g. we are calling
https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js
and
https://na1.salesforce.com/js/functions.js
Then logging in with .... sforceClient.login(user,pass);
How would I do the same with a sandbox account?
Many thanks
MF
What is the basic URL that is used to access your Sandbox?
You need to get URL information from Partner WSDL and make a small change to that by adding the first part of your sandbox url.
Suppose you access your sandbox as "https://dev.salesforce.com".
Login to your org , run partner wsdl and find for a string that looks similar to the one shown below
<soap:address location="https://www.salesforce.com/services/Soap/u/7.0"/>
Then your Sandbox url would be "https://dev.salesforce.com/services/Soap/u/7.0"/>
Hope this helps.
Hi,
I've successfully logged on. However, now the sforceClient.describeSObject function is not returning anything.
Again - this works fine against salesforce.com. The problem is with the Sandbox.
The code we have is as follows:
<script>
var ofields = sforceClient.describeSObject("'||sforce4.lead_pusher.decode_object_type@alticdr.world(xobj_types(i))||'").fieldList+",";
var afield;
var cspot1 = -1;
var cspot2 = 0;
for (var i=0; cspot1<=ofields.length; i++)
{
cspot2 = ofields.indexOf(",",cspot1);
if (cspot2 == -1)
{
cspot1 = ofields.length+100;
}
else
{
afield = ofields.substring(cspot1+1,cspot2);
cspot1 = cspot2+1;
if ((afield != "Id")&&(afield != "CreatedDate")&&(afield != "CreatedById")&&(afield != "LastModifiedDate")&&(afield != "LastModifiedById")&&(afield != "SystemModstamp"))
{
document.write(''<tr><td valign="top">'');
document.write(''<div id="'||xobj_types(i)||'_''+afield+''">'');
document.write(''</div>'');
document.write(''</td></tr><tr><td colspan="2"><hr></td></tr>'');
getCode("'||xobj_types(i)||'",afield,el_count,1);
el_count++;
}
}
}
</script>
MF