Close Code and Close notes mandatory for Change Request in 'Canceled' state

anubhavr
Giga Expert

As 'Cancel Change' is a UI Actions and it is not Client so we cannot use g_form.setMandatory function in UI Action. I tried to do it using Script include with 'Client Callable' but still I guess I can't use Glide Form functions in Script Include. I Tried with UI Policies also but not working. Can anyone suggest me solution for this??

11 REPLIES 11

BALAJI40
Mega Sage

Hi Anubhav,


Ui actions will work on both server and client side.


http://wiki.servicenow.com/index.php?title=Differences_Among_Scripts#gsc.tab=0


so you can glideform functions based on your requirement by checking ckebox of client.


marcguy
ServiceNow Employee
ServiceNow Employee

yes tick


client: true,


onClick: cancelChange()



when doing this, it runs the client side code first to ensure the fields you require are filled in and makes them mandatory as well. (cancelChange)



then if that passes and they have a value in the, it continues on and runs the server side code (moveToCancel)