How to prevent change tasks creation for standard change record

Lisa Goldman
Kilo Sage

Hello,

We need your guidance or recommendations how to prevent users from creating a standard change task if they don't fill out  "Justification" and Risk and Impact analysis" fields.   Thank you

 

Here is the screenshot of Standard Change, Planning Tab:

LisaGoldman_0-1695659749823.png

 

I was writing script on the Omit new button, but that did not works:

 

LisaGoldman_1-1695659874213.png

 

 

2 ACCEPTED SOLUTIONS

Hye @Lisa Goldman ,

 

Go to List control click on  Omit new button and saved it.

 

 

View solution in original post

jonsan09
Giga Sage
Giga Sage

You'll want to edit the list control for the related list by right licking on one of the column headers and selecting configure. List control should give you the options you are looking for.

2023-09-25 15_28_15-Users _ Carvana - Production and 7 more pages - Profile 1 - Microsoft​ Edge.png2023-09-25 15_28_28-change_request _ List Control _ ServiceNow — Mozilla Firefox.png

View solution in original post

8 REPLIES 8

Vishal Birajdar
Giga Sage

Hi @Lisa Goldman 

 

Can you try using onSubmit client script on standard change task.

You can use logic like below :

Check if parent record have filled two fields as mentioned by you.

If its not filled abort the submission.

 

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

Thank you for your suggestion @Vishal Birajdar 

I would show the "New" button only state is in "Implement" and "Review".

 

I have tried below code, but it is not working. Could you or someone help with the script, because I'm very weak at coding javascript.  Thank you  

 

LisaGoldman_0-1695663507693.png

 

 

Deepak89
Tera Expert

Hello @Lisa Goldman ,

 

create a UI Policy and set those 2 fields mandatory it will not allow you save the record until mandatory fields have some value.

 

 

Hi @Deepak89 

We used UI Policy to make those fields mandatory.  We trying to hide the Change Task New button if not in Implement and review state.

 

 

LisaGoldman_1-1695668522612.png