How to get instance URL in UI Action client script?

PhoenixMing0912
Giga Expert

Hi experts:

I am writing script in UI Action client script.

I want the URL domain in my script.

I have tried "window.location.host", but browser displayed "Cannot read property 'location' of null".

However, if I enter "window.location.host" in browser console, this command works.

Anyone could help?

5 REPLIES 5

Well, I sure wish I knew what * this * referred to, so I could best utilize all it's magical properties...