- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 12:43 PM
How can I hide the Notes section in the incident form????
using a Client Script onLoad???
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 12:58 PM - edited 05-17-2023 12:59 PM
You can hide it using the following onLoad Client Script:
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setSectionDisplay('notes', false);
}
Obviously you can put some If logic around it if you only want it hidden under certain conditions OR make it an onChange client script if you want to hide it when something changes.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 01:19 PM - edited 05-17-2023 01:21 PM
This article explains it...the first section in the yellow box:
http://servicenowguru.com/scripting/client-scripts-scripting/showhide-form-section/
If you configure the form layout, you can see all the sections (tabs) under the View Name - Default View.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 12:58 PM - edited 05-17-2023 12:59 PM
You can hide it using the following onLoad Client Script:
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.setSectionDisplay('notes', false);
}
Obviously you can put some If logic around it if you only want it hidden under certain conditions OR make it an onChange client script if you want to hide it when something changes.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 01:08 PM
How did you get the name of this section????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 01:19 PM - edited 05-17-2023 01:21 PM
This article explains it...the first section in the yellow box:
http://servicenowguru.com/scripting/client-scripts-scripting/showhide-form-section/
If you configure the form layout, you can see all the sections (tabs) under the View Name - Default View.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 02:18 PM