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.

how to reopen an incident by clicking ui action button.

hemasree kanduk
Tera Contributor

i have a scenario where i should create a button on the incident form,on clicking that button user can reopen the incident.

5 REPLIES 5

Community Alums
Not applicable

Hi @hemasree kandukuri ,

You can create your own custom UI Action. Try below code

Action name:-reopen_incident

onclick:-reopenIncident()

 

In script try below code
 
function reopenIncident(){
g_form.setMandatory('comments', true);

gsftSubmit(null, g_form.getFormElement(), 'reopen_incident');
}

current.incident_state = 2;
current.update();
gs.addInfoMessage(gs.getMessage("Incident reopened"));
action.setRedirectURL(current);
 
 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Community Alums
Not applicable

Hi @hemasree kandukuri ,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

Harish KM
Kilo Patron
Kilo Patron

Hi there is already a OOB UI Action called reopen incident . Check that

Regards
Harish

Musab Rasheed
Tera Sage

Hello,

OOB it is already available, please check below

https://instance/sys_ui_action.do?sys_id=d2d9d8110a0a3c7401bbadabed9b91db&sysparm_record_target=sys_ui_action&sysparm_record_row=3&sysparm_record_rows=25&sysparm_record_list=tableSTARTSWITHIncident%5EORDERBYDESCname

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

Regards

 

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