- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2017 02:41 PM
Hello
We are trying to implement functionality which is supposed to ask for additional information before a Change is worked on.
The intent is that if the assignee is supposed to start work on the change, there may be some additional information that may need to be entered before the change can be worked on.
The idea is to have a redirect from the Change form to this separate form to log details, and once the details are all entered, it is supposed to redirect back to the Change Request form. This form is supposed to be linked to the Change record as well.
I've seen action.setRedirect being used but that's more on the server side, and wondering if there is a client side redirect I can use?
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2017 05:42 PM
Sorry, should be
g_navigation.openPopup( 'change_request.do?sys_id=-1&sysparm_query=parent=' + g_form.getValue('sys_id'), 'New Change');
New Change is the title of the Popup
The sys_id=-1 part opens a new change request
The parent= + g_form.getValue('sys_id') will auto populate the 'parent' field, so you can relate it back to the origin change.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2017 02:59 PM
Please check below which has solutions to redirect using client script
How can I redirect a user with an onChange client script?
ServicePortal - Redirect to home page after form successful submission submission?
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2017 06:39 PM
Please see the g_navigation API.
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=c_GlideNavigationV3API
You should avoid using the DOM (ie top.window.redirect) when ServiceNow provides the API to do it for you.
Example:
g_navigation.openRecord('change_request',sys_id_here);
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 06:42 AM
Thanks Paul. OpenRecord would help with the case where I am trying to redirect back to the change, but wondering about a redirect directly to a new record that would be the child of a change.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 02:41 PM
Instead of redirecting from the new record, you might consider using the openPopup API.
For example, if you are using the Parent field for you relationship, this opens a new Change Request which will be related to the originating Change:
g_navigation.openPopup( 'change_request.do?sys_id=-1&sysparm_query=parent=' + g_form.getValue('sys_id) + 'New Change');
This eliminates the need to redirect back to the parent.
ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022