How to redirect to another Service Portal page after submit of service catalog

JC S_
Mega Guru

We are trying to redirect user after submission of a service catalog item form to a specific page however the below code does not work:

producer.redirect ="sp?view=sp&id=form&table=change_request&sys_id="+current.sys_id;

I've seen a known error document on the producer.redirect not working for Service Portal (fixed in Jakarta) - we are already on Jakarta so not really sure why it is still not working. Is there any way to redirect user to specific SP page?

7 REPLIES 7

Katie A
Mega Guru

To redirect a record producer in the Service Portal you need to use producer.portal_redirect

https://docs.servicenow.com/bundle/kingston-it-service-management/page/product/service-catalog-management/concept/c_PopulatingRecordData.html

Change the script to this:

producer.portal_redirect ="sp?view=sp&id=form&table=change_request&sys_id="+current.sys_id;

Hi, I'm hoping you could help me

I'd like to try this but I was wondering firstly if this can only be used to redirect all types of records submitted via the sc_cat_item widget to the same place or if this can be used just to redirect one type? e.g. requests, incidents, change requests.

 

And also, where does this need to be put? It says on the wiki page in the 'script' field - which script field would that be?

 

Thanks you in advance 🙂

 

Sarah

Gerrit Zevenber
Kilo Contributor

Thanks, this works!

Cheers, Gerrit