
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 08:42 AM
hi all,
is the access to 'window.location' restricted in client scripts? my use use is to get the paramters from the URL and then process the information. I get below error when i try to use the 'window.location' object in the code. what is the workaround?
Ravish
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 08:46 AM
Check this out:
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 08:46 AM
Check this out:
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 10:13 AM
Thanks Prateek.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 08:46 AM
Hi Ravish,
I use this to read url parameters
var id = getParmVal('<parameter name>'); //place this in the main function in client script
//place this function in the same script, out of the main function
function getParmVal(name){
var url = document.URL.parseQuery();
if(url[name]){
return decodeURI(url[name]);
}
else{
return;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2019 10:13 AM
Hi Anurag, Its now working. per this post, seems like document and window object are no longer supported in regular or service portal view.