customize "Update" form button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2009 04:59 PM
Hi,
How can I modify the Update form button from the default action "save record and redirect to previous screen" to "save record and redirect to Home Page"?
Thanks,
Sam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2014 11:50 AM
HI,
open any form in which u want to customize update buttton>>Right click on the form >>select personalize ui actions >>click global as there in the related links >> search existed update (i.e. global button) button >>open it>>copy action name of button.(i.e. sysverb_update)
Now create new ui action on the same form keeping action name as just copied previously and in the script write the code
action.setRedirectURL(' ');//specify ur url with in the single quotes.
Note:action name on new button should be same as in global update button.otherwise it will create two update buttons on your form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2014 12:44 PM
Instead of doing the above by m srishilpa, we simply added a new UI action (a copy of Update) that redirected to the current form and called it "Save". So we do have two buttons on each form: "Update", if you want to save and go back to a list, and "Save", if you want to save a remain on the same form. It's a nice option to have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2014 01:16 AM
Hi Geoff Cox,
Thanks for suggestion .I had an issue with update button on self service view of incident.
I created a site.An end user(i.e joe employee) try to update his ticket in the page of site.after clicking update button end user is getting the self service home page instead of incident list page.
Please let me any suggestion how to resolve the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2014 07:16 AM
Well, sometimes this behavior can be affected by what other tabs or windows you have open.
If you update a ticket on another open window, it can affect the record stack maintained across the browser. So if you click "Update", it will go back to whatever the record on the other window will go back to. That's another reason I like the added "Save" button; at least I know it will always stay on the same record. ServiceNow's navstack can get confused when there are multiple pages and tabs open (and I always have multiple pages/tabs open).
How did your user get to the ticket? If he searched for it, and navigated there that way, then the update button most likely would take you back to the home page.
You could further customize the "update" UI action to deliberately take you to the list view of whatever object you are on, instead of just popping the previous location off the navstack. Maybe this will give you the behavior you are looking for.
Would you need help coding that?
Cheers,
Geoff.