- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 03:14 PM
On the incident form , there are the following sections:
incident
notes
related records,
closure information
External
What I'm trying to accomplish is to hide the external tab when the form loads , and it should only be shown when the 'Escalated To' filed is showing certain values. The 'Escalated To' field itself is only shown when the state changes to Escalated
this is what I did but doesn't work:
on change client script:
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 03:31 PM
Section name looks incorrect, get the correct section name using alert (below sample script)
function onLoad() {
// var sections = g_form.getSectionNames();
// alert(sections);
if (g_form.isNewRecord()) {
g_form.setSectionDisplay('external_analysis', false);
}
else{
g_form.setSectionDisplay('external_analysis', true);
}
}
Suraj Chauhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 03:31 PM
Section name looks incorrect, get the correct section name using alert (below sample script)
function onLoad() {
// var sections = g_form.getSectionNames();
// alert(sections);
if (g_form.isNewRecord()) {
g_form.setSectionDisplay('external_analysis', false);
}
else{
g_form.setSectionDisplay('external_analysis', true);
}
}
Suraj Chauhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 03:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2016 03:34 PM
Please see this post for more details. The setSectionDisplay is expecting the name of the section not sections[4]:
Show/Hide Form Section by Name - ServiceNow Guru