- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:06 AM
There is a need to hide the New button of Change Tasks on Change Request only for STANDARD CHANGES.
In Emergency and Normal change, the New button should be visible.
Could someone help what script I need to write in Omit New condition please?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:31 AM
Script like this, use my instructions above around getting to configure > list control:
var answer = false;
if (parent.type == 'standard') {
answer = true;
}
answer;
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:09 AM
Here is an example, not directly for change tasks on change requests, but the logic is pretty much the same. Instead of doing 'gs.hasRole('itil')', you would do 'current.type == 'standard', etc.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0692571

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:09 AM
Hi,
Is this for a related list tab? Like at the bottom of the screen?
And you can set condition for that to not show when parent record is of a certain type
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:19 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2020 10:20 AM
Use list control method I supplied above and then this script in "omit new condition" field:
var answer;
if (parent.type == 'standard') {
answer = true;
} else {
answer = false;
}
answer;
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!