button in the incident saved and closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2023 10:42 PM
Hey! I need to create a button in the incident
called save and closed and its purpose is that I go into 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 automatically goes to the list! The following code works partially, it saves the changes but does not go back to the list of incidents. How do I do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2023 11:06 PM
the required functionality is already performed by the "Update" button. So why do you want to reinvent the wheel?
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 01:15 AM
True, but I need it in the workspace, how do I make it there too?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-17-2023 12:24 AM
Hello @yardenKrispel
I just simply tried with the below code and it worked expected as it saved the currect record and redirected to incident list view.
current.update();
var url = current.getTableName() + '_list.do';
action.setRedirectURL(url);
Let me know your views on this and Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Regards,
Aniket