- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 01:55 AM
I have written an onChange client script that works in my Development instance, but when I try it in my client's environment it doesn't work. I am using getReference to pick a value from a form with a callback, and in the callback function updating values that were first defined early in the overall script. I attached those properties to the window object to make them global and then updated them in the callback functions, then used the values to update my form with setValue. This works fine in my Dev instance.
Now that I have put the same script into my client's test instance, the script doesn't work and I get an error message:
which seems to indicate that the window object doesn't exist. I thought that the window object was always available in javascript?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:18 AM
Hi Steve,
Window is null for service portal and this is the basic condition to identify the UI type for service portal.
Supported and unsupported client scripts
But top is accessible in client scripts.
top.location
top.document.getElementById() ......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:28 AM
Check if following working or not
top.window.dLik = '0';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2017 02:34 AM
Thanks - I tried
top.dLik = '0';
and that is working.
Thanks very much - it was your comment "top is accessible in client scripts" that got me working.
Steve