Avoid Mandatory Validation on click of UI Action

pavan_yakkala
Kilo Contributor

Hi,

I have a form on user defined table (u_ba_service_package) and created 2 UI Actions "Save" and "Cancel".

I have   mandatory fields on the form and on click of "Save" and "Cancel" mandatory fields are validating and getting an alert "The following mandatory fields are not filled in:<field 1>,<field 2> etc.."

but i don't want to validate mandatory fields on Click of "Cancel". it should be happened only when click of "Save".

How can i achieve this? can any one please help me on this?

Thanks,

Pavan.

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee
6 REPLIES 6

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Pavan,



You may find the below thread as helpful.


Saving a record without populating all mandatory variables


Thanks Pradeep,


The below statement in UI Action made my requirement done.


g_form.checkMandatory = false;




Thanks,


Pavan


Perfect


Would you mind marking answer as correct if this answers your question.


Done .