- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2017 06:51 AM
I want my Record producer to redirect to a homepage after submitting the record with a message of the RITM submitted?
I am trying with this code but still it is not redirecting me to the home page and redirects me to the RITM page.
function onSubmit() {
//Type appropriate comment here, and begin script below
function onLoad() {
setTimeout('clearMsg()', 4000);
}
function clearMsg(){
g_form.clearMessages();
producer.redirect = producer.redirect = "https://katerradev.service-now.com/nav_to.do?uri=/home.do"
//action.setReturnURL(current);
//window.top.close();
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2017 07:25 AM
In your record producer script
The below is what I've used for an incident which redirects to the service catalog screen. Adjust the message to your needs.
- var msg = "The incident " + current.number + " has been opened based on your report.<br/>";
- msg += "Due to the potentially sensitive nature of the accident, viewing is restricted to the Facilities team.<br/>";
- msg += "They will contact you if they require any further information.";
- producer.redirect = "catalog_home.do?sysparm_view=catalog_default";
- gs.addInfoMessage(msg);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2017 07:07 AM
Hold on a sec. Are you actually talking about a Record Producer? Requests and Request Items are usually the product of submitting a Catalog Item or an Order Guide.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2017 06:57 AM
There is 2 producer.redirect which is not required and add it to the producer script.
producer.redirect = "https://katerradev.service-now.com/nav_to.do?uri=/home.do"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2017 07:25 AM
In your record producer script
The below is what I've used for an incident which redirects to the service catalog screen. Adjust the message to your needs.
- var msg = "The incident " + current.number + " has been opened based on your report.<br/>";
- msg += "Due to the potentially sensitive nature of the accident, viewing is restricted to the Facilities team.<br/>";
- msg += "They will contact you if they require any further information.";
- producer.redirect = "catalog_home.do?sysparm_view=catalog_default";
- gs.addInfoMessage(msg);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 03:54 AM
Yes, Lee!!
You are correct!! This works like a Charm!!
Thank you my friend!!
Regards,
Raju Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2017 04:13 AM
Hi Raju, glad this is working for you!
Can you mark as correct please.