
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 06:33 AM
Like the title says I would like to create a new form button that if clicked would re-direct me to a different module inside the platform and also fill out a field. I have looked at a few other posts on this topic but none of them seem to really be what I am looking for.
Any suggestions on how I may be able to do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:25 AM
Can you try it like this?
var url = "https://MYINSTANCE.service-now.com/u_new_asset.do?sysparm_stack=u_new_asset.do?sys_id=-1%26sysparm_query=u_operation=modify_record^u_select_record=TRP-96J194700345";
action.setRedirectURL(url);
As suggested by the guru:
https://www.servicenowguru.com/service-now-general-knowledge/populating-default-values-url-module/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 06:38 AM
Hi Steve
I would think that you can make this via GlideAjax... So basically you will send the data to the redirected field.... See more about GlideAjax here https://community.servicenow.com/community?id=community_article&sys_id=9f7ce2e1dbd0dbc01dcaf3231f961....
and for the redirect, it could be something like
action.setRedirectURL("URL");
** Be sure the UI action has the "Client" unchecked as the set Redirect runs on the server side from what I know

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 06:39 AM
adding one article here, see if it helps you.
3 Ways to Populate Values in ServiceNow via the URL
you can also check chuck video.
https://community.servicenow.com/community?id=community_blog&sys_id=a7f352af1b6cc0d0fff162c4bd4bcbfe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 06:53 AM
Hi Steve,
You can redirect to a form and via the URL already set some values. You can use:
var url = "https://<instance name>.service-now.com/nav_to.do?uri=<tablename>.do?sys_id=-1%26sysparm_query=<field>=<value>^<field2>=<value2>"
action.setRedirectURL(url);
Change the Table name to the table you want. The sys_id=-1 means it will open a "Create new" form. And in the sysparm_query= part you can add fields=value pairs.
This way the fields are filled in, but the record is not saved into the system until the user is done.
Let me know if you have any questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2020 07:11 AM
I tried to use this with my info but it just flashes when I click the button and goes blank. Am I doing it wrong?
var url = "https://MYINSTANCE.service-now.com/nav_to.do?uri=u_new_asset.do?sys_id=-1%26sysparm_query=u_operation=modify_record^u_select_record=TRP-96J194700345";
action.setRedirectURL(url);