How to set the resolution field mandatory once we click on resolve button in RITM

mania
Tera Contributor

Hi,

 

I have created a new ui action button called resolve on RITM form. How set the resolution code field mandatory once we click on resolve button. 

Can anyone please help on this, It will be usefull.

 

Thanks!

4 REPLIES 4

Service_RNow
Mega Sage

Hi @mania 

 

please this thread will helpful to you.

https://www.servicenow.com/community/developer-forum/issue-with-ui-action-with-mandatory-fields/m-p/...

 

Please hit like and mark my response as correct if that helps

swathisarang98
Giga Sage
Giga Sage

Hi @mania ,

 

Could you please share the ui action code which you have configured ?

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

Vrushali  Kolte
Mega Sage

Hello @mania ,

 

You can write a function in UI action script like below and make use of g_form.setMandatory function to set field as mandatory.

 

VrushaliKolte_0-1716977992693.png

If my answer solves your issue, please mark it as Accepted ✔️ and Helpful 👍 based on the impact.

Dnyaneshwaree
Mega Sage

Hi @mania ,

As per @Vrushali Kolte , just try using adding below one line code to resolve your issue:

g_form.setMandatory('resoution', true); // Please update resolution field with your resolution field name

Mark it Helpful and Accept Solution!! If this helps you to understand.

Thanks in advance!!
 



Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru