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

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 or .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

var url = location.href;

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