Make comments field mandatory in Agent work space.

KaMmILa__
Tera Expert

Can some one help me how to make comments field mandatory in agent work space

I tried g_form.setMandatory('comments', true); but not working , I am enforcing that in the workspace client script section , every other action is working fine except setting mandatory to comments section.

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

I have this if it helps

find_real_file.png

 

find_real_file.png

 

-Anurag

-Anurag

View solution in original post

12 REPLIES 12

HI @Anurag Tripathi Slightly different to this issue, apologies for that. I've come into a similar situation here and I looked at your screenshot and see the work notes field is highlighted to "red" in color when it becomes mandatory. In my case, we have a custom UI action button and onClick, the work notes turns out to be mandatory, but does not gets highlighted in red. I checked the workspace client script and we have the exactly the same piece of code as per your screenshot. 

Do you have any insights to it?

Thanks,

Nitin

I was also able to make it work on the left panel and not on the notes section.

-Anurag

Ankur Bawiskar
Tera Patron
Tera Patron

@KaMmILa^^ 

Out of the box there is this "Reopen Incident" UI action which makes comments mandatory in Agent Workspace

Please check the code from that and update yours

https://instanceName.service-now.com/nav_to.do?uri=sys_ui_action.do?sys_id=d2d9d8110a0a3c7401bbadabed9b91db

Regards
Ankur

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

Thanks Ankur , I have the same code but still the mandatory is not displaying 

find_real_file.png

It will not show mandatory on the compose section, it will show it on the Incident Body section. See my screenshot.

-Anurag