How to hide New button of Change Tasks on Change Request only for STANDARD CHANGES

BHIM RAO2
Tera Expert

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?

find_real_file.png

 

1 ACCEPTED SOLUTION

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!

View solution in original post

13 REPLIES 13

erik_brostrom
Mega Guru

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

Allen Andreas
Administrator
Administrator

Hi,

Is this for a related list tab? Like at the bottom of the screen?

find_real_file.png

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!

Hi,

Yes , it is in the related list tab > change task New Button.

find_real_file.png

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!