Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI action auto save upon click

RudhraKAM
Tera Guru

I have a Ui action where i am changing the state of the field on click but its not saving until i click on save 

 

I checked the Client check box 

and onclick i have a function :............... workinprogress();

and in the script 

function workinprogress()

{

g_form.setMandatory('u_feedback_related_to_its_service', true);
g_form.setMandatory('assigned_to', true);
g_form.setValue('state', '2');
}
current.update();

 

My issue is when  i click on the work in progress ui action its changing the state but not saving until i click on save and also it should check the fields "assigned to and u_feedback_related_to_its_service" if they are empty then it should make them mandatory and should not change the state until values provided.

 

can some one help me with the code 

5 REPLIES 5

RudhraKAM
Tera Guru

issue Fixed with this https://www.servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/