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.

Issue on UI ACTION

Fahimas
Tera Contributor

 

code was not working 

condition: current.state == 2&&(gs.getUser().isMemberOf(current.assignment_group)||(gs.getUser===current.assigned_to))

code:

//getting field value and setting them mandatory through clientscript
if(typeof Window=='undefined')
{
 g_form.setMandatory('hold_reason');
 g_form.setMandatory('comments');
}
//making update through serverscript
function onHold(){  
    current.state='On Hold';
    current.update();
    action.setRedirectURL();
}
explanation:button must be visible when loggedin user was a member of assignment group or equal to assigned_to  field making hold reason mandatory and setting the state into on hold
issue: button was visible these time but the state was not changed and it does not make the above mentioned field into mandatory
 
0 REPLIES 0