- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2018 11:23 PM
This code is perfectly fine on Try it , but doesn't work on service portal
variable 'box' is a checkbox
g_form.setValue('box',true); doesn't work on service portal
I even selected UI type to be 'All' ; but still doesn't work on portal.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 12:16 AM
Hi Sonita,
I'm getting the result. I'm using the UI policy. follow the below screenshots it works.
use runscripts in ui policy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2018 11:59 PM
Hi Sonita,
What error you are getting in browser console?
Can you add that here or the screenshot?
Seems to be issue with instance?
What version you are using?
https://community.servicenow.com/community?id=community_question&sys_id=0d19dfeddb9d13c8fc5b7a9e0f9619a0
As per above link it is an issue in Kingston patch2
Patch 4 solves this:
https://docs.servicenow.com/bundle/kingston-release-notes/page/release-notes/quality/kingston-patch-4.html
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2018 11:59 PM
which client script are you trying?
if you want a checkbox true when page loading no need to write a onload client script. Set Default value to true in variable level.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 12:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2018 09:17 AM
Actually i'm working on an onchange client script ; works perfectly in itil view , but doesn't work in portal view