How do you do a redirect to a RITM on submitting a request from the Service Portal?

TJ Sandor
Kilo Expert

I've been trying to get a re-direct on catalog item submit to work in our current London environment. We want the next page after submit to be the RITM; NOT the Request. We are a 1:1 environment here. 

I've tried several approaches, including one that had PREVIOUSLY worked for us when the portal was first built back in Jakarta. It will not work with the current iteration of "SC Catalog Item" widget. 

Does anyone know what I must configure on the widget to make it redirect to the RITM, not the REQ?

Thanks for reading!

TJ

1 ACCEPTED SOLUTION

Thank you Allen! I did end up finding this one online too!

It was SOOO helpful. 

I ended up using: https://community.servicenow.com/community?id=community_question&sys_id=53a64765db1cdbc01dcaf3231f96...

I edited two widgets for "Ticket Form" page. "Ticket Fields" and "Ticket Conversations" were cloned and edited. 

In "Ticket Conversations" widget (server script):

if (data.table == 'sc_request'){
		var item = new GlideRecord('sc_req_item');
		item.addQuery('request',data.sys_id);
		item.query();
		if (item.next()) {
			gr = item;
			data.sys_id = gr.sys_id;
			data.table = 'sc_req_item';
		}
	} 

 

In "Ticket Fields" widget (server script):

var gr = $sp.getRecord();
	var sys_id = $sp.getParameter("sys_id");
  var table = $sp.getParameter("table");
  if (table == 'sc_request') {
	   var item = new GlideRecord('sc_req_item');
	   item.addQuery('request',sys_id);
	   item.query();
	   if (item.next()) {
		    gr = item;
	   }
  }

Finally, I created a "Page Route Map" to redirect "SC Request" to "Ticket Form".

 

 

View solution in original post

13 REPLIES 13

Allen Andreas
Administrator
Administrator

Hi,

Yea, the old Jakarta trick which was basically you being able to easily set the redirect page is gone (terrible removal by SN there...)...so it looks like others are going with this page routing method:

https://docs.servicenow.com/bundle/london-servicenow-platform/page/build/service-portal/task/reroute...

Basically you specify that it should go to the RITM level versus Request. Give that a shot.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

The Page Route method simply loads the REQ in the Ticket form. It doesn't load up the RITM. 

It was a nice suggestion though. Now I see how Page Routing works. 

I need the portal to go to the RITM of the REQ that was just submitted. Since all our requests are 1:1 REQ:RITM. 

 

TJ

The method I mentioned above changes the routing from one page to another. So you'd have to specify the page from request to ritm.

More context, see suggestion here: https://community.servicenow.com/community?id=community_question&sys_id=53a64765db1cdbc01dcaf3231f96...

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Thank you Allen! I did end up finding this one online too!

It was SOOO helpful. 

I ended up using: https://community.servicenow.com/community?id=community_question&sys_id=53a64765db1cdbc01dcaf3231f96...

I edited two widgets for "Ticket Form" page. "Ticket Fields" and "Ticket Conversations" were cloned and edited. 

In "Ticket Conversations" widget (server script):

if (data.table == 'sc_request'){
		var item = new GlideRecord('sc_req_item');
		item.addQuery('request',data.sys_id);
		item.query();
		if (item.next()) {
			gr = item;
			data.sys_id = gr.sys_id;
			data.table = 'sc_req_item';
		}
	} 

 

In "Ticket Fields" widget (server script):

var gr = $sp.getRecord();
	var sys_id = $sp.getParameter("sys_id");
  var table = $sp.getParameter("table");
  if (table == 'sc_request') {
	   var item = new GlideRecord('sc_req_item');
	   item.addQuery('request',sys_id);
	   item.query();
	   if (item.next()) {
		    gr = item;
	   }
  }

Finally, I created a "Page Route Map" to redirect "SC Request" to "Ticket Form".