You need to sign in to do that
Don't have an account?

Salesforce Global Server variable
Is there a global variable for the salesforce server you are connecting to.
Currently, I have the following code:
But, I don't want to hardcode the URL, so how can I get the salesforce server name that I am currently connected to.
I was trying to use the URLFOR function, but I still need a target value and didn't know what I could put.
Thanks in advance
Currently, I have the following code:
Code:
var saveURL ="https://tapp0.salesforce.com/"+ newOppId;
But, I don't want to hardcode the URL, so how can I get the salesforce server name that I am currently connected to.
I was trying to use the URLFOR function, but I still need a target value and didn't know what I could put.
Thanks in advance
I'm not possitive what you are looking for but if your are running the s-control within the system it will automatically direct to your current server. If you do a call window.location = '/' + oppId it will automatically direct to the current server. If you are on NA1 it will automatically populate the https://na1.salesforce.com without putting it in your code.
Hope this helps.