- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 09:02 AM
I need to implement an UI button, Save and Stay that saves the ticket, but keeps it open, basically have the exact same functionality as right clicking on the menu bar and selecting save from the context menu. How would I do that? Suggestions?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2016 07:20 PM
If you don't reference the UI action in scripts, clear out the Action Name. If you do, give it a different name. The global Save option already has an action name of sysverb_update_and_stay so your new UI action overrides it on the incident form.
I incorrectly said it was the Name in a previous post but it is actually the action name that allows you to override a UI action inherited from global or a parent table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 09:08 AM
The statement to keep you on the form is:-
action.setRedirectURL(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 10:04 AM
action.setRedirectURL(current);
current.update();
But you could also just put any of the global Save buttons on the form as well because they should always stay on the form. Update and Submit buttons usually return to the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 12:50 PM
Hi, i want to have save&stay enabled through out, even if itil user is creating incident from application menu. How would I do that? Anything in condition, I need to have?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2016 01:44 PM
You should only have to use this condition current.canWrite() and then set the Table to Global. If a table already has a Save button and you want it to be called "Save and Submit" instead, you will also need to rename the existing Save button for that table.
Otherwise, I believe you will end up with two save buttons (a "Save" button and a "Save and Stay" button) on the same form when you change your global button. If I recall, global buttons apply when there is not a table-specific button with the same name.