- 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-18-2017 12:15 PM
Just want to clarify, the line should be
g_navigation.openPopup( 'change_request.do?sys_id=-1&sysparm_query=parent=' + g_form.getValue('sys_id') + 'New Change');
So if there is no record existing under the current circumstance, the popup will assume the record is new, correct? Also, how does the 'New Change' work with it? Logically, it means that the parent is pointing to "<sys_id>New Change".
Just wondering about clarification.
Thanks

- 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
01-02-2018 02:17 PM
Hi Paul.
So I'm finally getting this popup to work but I notice two things:
1) The ServiceNow Back button is visible (I want it hidden)
2) The Window is blank. I likely need a separate view for this but wondering how I can point it to the correct view.
Thanks for your help so far.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2018 04:36 PM
Check out the openPopup documentation for the different options that are available
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GNV3-openPopup_S_S_S_B
The available options are here
Window.open() - Web APIs | MDN
The sysparm_view parameter sets the view
Example
var url = 'change_request.do?sys_id=-1&sysparm_query=parent=' + g_form.getValue('sys_id') + '&sysparm_view=change;
g_navigation.openPopup(
url,
'New Change',
'toolbar=no'
);
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
01-03-2018 09:28 AM