Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Ordered Item Link - This is an OOB field that refers to sc_ordered_item_link table. Here you could define external URLs where the user can navigate to after the item has been requested.

In most of the cases this would be:

1. Link to a survey

2. For item tracking purposes

3. if the user wishes to know more about the item that has been requested. For example - usage instructions, company policies, etc.

Before you go ahead with this implementation, I would like to inform you that this is a customization, and currently not supported by ServiceNow Technical Support Team.

The OOB portal page for Order Status does not show the Ordered Item Link as it shows in native platform UI.

The OOB portal page & platform UI for Order Status is shown as below.

Service Portal

find_real_file.png

Platform View

find_real_file.png

 

 

Here the Go to survey option is populated by the OOB field - Ordered Item Link (OOB column name - ordered_item_link)
For some users, this can be used to redirect the user to a different page. For example - survey link, item tracking page etc. They would want to have field visible on the portal as well.

Currently, OOB widget does not allow you to show this field, but tweaking the widget code can help you achieve this.

The customizations described here is not an OOB feature of the service portal.
However, users can clone their OOB order status widget and add the custom script to show the Ordered Item Link field on the catalog order status page in service portal.

Here is what you have to add on the cloned widget:

1. Create a clone of the widget: SC Order Status

2. Add the below snippets in the widget

HTML Template:

<th class="wrapper-md col-md-2" ng-if="::options.display_name === 'true'">${Order Item Link}</th>
<td class="wrapper-md">
<a title="{{::requestItem.number}}" href={{::requestItem.order_item_link}}
>Go to Survey</a>
</td>


Server Script:

var gr = new GlideRecord('sc_cat_item');
gr.get('sys_id',reqItemGr.cat_item.getValue());
var item_link = gr.ordered_item_link.getValue();
var gr1 = new GlideRecord('sc_ordered_item_link');
gr1.get('sys_id',item_link);
var linkURL = gr1.link_url.getValue();
order_item_link: linkURL,


Even though this would fix the issue, since this is a custom implementation, this is only one of the many methods to achieve this requirement.
You need to perform thorough testing before you move the enhancement to further environments.

Here are some articles which will help you in customizing the widget.

1. Add an ordered item link to an item
2. Clone a widget

3. Widget troubleshooting guide

Comments
SatheeshKumar
Kilo Sage

Awesome solution Satyaki Bose!

 

But we should try to be out of box!

Customising complex OOB widget is not appreciated !

When you clone a widget, you become responsible for ensuring your widget continues to function as expected after a ServiceNow upgrade.

If a widget with complex logic is cloned and you want to align it with the recent upgrade, you may need to analyze both original and cloned widgets line-by-line to determine what changed and to ensure nothing has stopped working. We know from experience that some widgets tend to change quite often, even within patches and hot fixes.

 

Alternatively , we can use OOB solution  (Newyork). 

 

The link for created RITM was there already but not as a seprate link but in the details section itself.

Configure instance  option to show both request(non clickable) and ritm number(clickable ).

 

 

 

-Satheesh

 

Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Hi @SatheeshKumar,

I guess you are not referring to the correct field in the screenshot you have attached.

What you are referring to is the actual item name that was used to submit the request. Whitelist IP is the name of the catalog item.

But within the same catalog item, you will have another OOB field called Ordered Item Link. Please refer to the screenshot and the video recording attached.

You can add this field by going here - https://INSTANCE_NAME.service-now.com/nav_to.do?uri=sc_layout.do?sys_id=d07373bbd7222100f2d224837e610348

As technical support, we do not support customizations. But I have seen many customers asking for this field to be also shown on the portal.

We have seen many customers who customize the OOB widgets to get the desired result, which is not achievable through the OOB widget.

We would like to keep widgets simple, but at the same time flexible enough for customers to make modifications.

But yes, it's always the responsibility of customers to verify if the custom widget is compatible with the latest releases/versions.

I guess that's where the developers come into the picture.


Best regards,
Satyaki Bose
Technical Support Engineer - User Experience
servicenow | Works for you™

Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Screenshot

Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Refer to the video recording here

jagdeep
Mega Contributor
Hi Satyaki, The article was very precise. The solution would definitely help, but again the challenge comes when the widgets stops working with upgrades, and certain APIs fail to work as expected. I this there should be a compatibility mode for widgets in portal, which should work irrespective of upgrades. You can take it up with your business. Thanks, Jagdeep
Satyaki Bose1
ServiceNow Employee
ServiceNow Employee

Hi Jagdeep,

The compatibility mode is a great idea, but am not quite sure as to when the developers and business would introduce it in the platform.

You can in fact place an enhancement request for this here:

https://hi.service-now.com/com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=98c2bb69bc3eb0003510286b6cad6d26

Best regards,
Satyaki Bose
Technical Support Engineer - User Experience
servicenow | Works for you™

Version history
Last update:
‎10-01-2019 02:59 PM
Updated by: