Make resolution fields mandatory only in a dialog box (close incmplteUI Action)

Community Alums
Not applicable

In HR form, we are using the Close Incomplete UI action, and OOB we are getting the Work Notes field in the dialog box. Now, we would like to make resolution fields mandatory in the form when the Close Incomplete dialog box change gets saved.

When we click on the close incomplete button (Close Incomplete UI Action) on the HR case, it will show a dialog box with a work notes column.

We need to make the resolution fields mandatory when the user clicks on the close incomplete button on the HR case.

So we need to add these fields to the dialog box.

Can anyone help on this?

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@Community Alums 

it's a UI page so did you check the code inside it?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

Yes we have HR Comment Dialog UI Page, But we are not getting where we need to add the script because it is OOO.

Please give me sample script.

 

@Community Alums 

OOB it already has comments which asks for reason for closing the case as incomplete

what else do you require?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Community Alums 

the work notes mandatory is driven by this in the OOB UI action

dialog.setPreference('sysparm_is_required', false);

If you make it true then it will work OOB

dialog.setPreference('sysparm_is_required', true);

So update the OOB UI Action and no change required to UI page

AnkurBawiskar_1-1735650858854.png

 

 

AnkurBawiskar_0-1735650836706.png

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader