function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Salesforce Global Server variable

Is there a global variable for the salesforce server you are connecting to.

Currently, I have the following code:
 var saveURL =""+ 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

Hello sgkmills,

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 without putting it in your code.

Hope this helps.
I found this out last week by deleting the ' '