create a button called Save closed

yardenKrispel
Tera Contributor

Hello! I'm trying to create a button called Save closed that will appear at the top of the incident form and as soon as it is clicked it saves and closes to the list of incidents I did through a UI action but it doesn't work I mean I see the button but when I change details in the incident and click the button nothing happens I need help with the script I wrote

 

 

yardenKrispel_0-1702567384256.png

 

5 REPLIES 5

SunilKumar_P
Giga Sage

Hi @yardenKrispel , Please try the below script.

 

current.state = 7;
current.update();
var url = "/incident_list.do?sysparm_query=active=true";
action.setRedirectURL(url);
 
SunilYadav_P_0-1702569834489.png

 

Thanks,

Sunil

The solution you gave me is that it closes the whole incident for me. My intention is that after I save it goes from the fault itself to the list and saves every change I make

Hi @yardenKrispel ,

I'm not sure on what exactly 'My intention is that after I save it goes from the fault itself to the list and saves every change I make'. does mean. Could you please elaborate or provide more details?

 

Regards,

Sunil

My intention is that I now enter the incident form and then I change something and then I want to save and after the save it goes out of the form to the list of incidents, it's not that the status will become closed, that's not the intention, but after I save it goes automatically to the list