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
RIteshMRIteshM 

getting the domain origin from $Origin

i am trying to set value of custom url field to a visualforce page to for that i need domain oring prefix like ap1.salesforce.com or na1.salesforce.com .how to get that in UI it is showing some global objects $Organization,$Profile,$System,$User,$UserRole which object should be used and which field please tell

Devender MDevender M
You can try this code

<script>
var url = location.href;
alert(url);
</script>
GSBassoGSBasso

$Api might prove useful (for your purposes it doesn't matter which version you use).