
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2019 12:25 PM
Build: London
I have service catalog tasks [sc_task]. Which are children of my request items [sc_req_item]. Which themselves are children of requests [sc_req]. In the OOTB instance, an SCTASK has a reference field, which allows for lookups and it has a preview button which allows previews and the ability to open the parent RITM. Great.
Well, I have users that don't want to use the preview button to preview or open the associated parent RITM, they just want a link. I thought this would be a simple matter of configuring the Form Layout or Related Lists and adding a link on the [sc_task] form, but it seems I'm mistaken.
Do I actually have to go through the process of creating an explicit one to many relationship between [sc_task] & [sc_req_item] or am I really not understanding how to use Form Layout or Related Lists?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2019 02:52 PM
If it is a particular user unless they are the president of the company I defiantly would not do it and I would hope that your management will back you up on that. However the only way I could think to do this was with the following.
1. Create a new filed of type URL. I called mine RITM URL.
2. I used a UI Policy to make it read only and an ACL of type list edit to make it so someone cannot add it to their list layout and edit it.
3. I created a Business rule on the sc_task table that is after insert no conditions since we want it on all task. The below code creates the URL for you.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var url = gs.getProperty('glide.servlet.uri') + "sc_req_item.do?sys_id=" + current.getValue('request_item') + "&sysparm_view=";
current.u_ritm_url = url;
current.update();
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2019 02:52 PM
If it is a particular user unless they are the president of the company I defiantly would not do it and I would hope that your management will back you up on that. However the only way I could think to do this was with the following.
1. Create a new filed of type URL. I called mine RITM URL.
2. I used a UI Policy to make it read only and an ACL of type list edit to make it so someone cannot add it to their list layout and edit it.
3. I created a Business rule on the sc_task table that is after insert no conditions since we want it on all task. The below code creates the URL for you.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var url = gs.getProperty('glide.servlet.uri') + "sc_req_item.do?sys_id=" + current.getValue('request_item') + "&sysparm_view=";
current.u_ritm_url = url;
current.update();
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2019 06:50 AM
What I ended up prototyping were 2 things. This solution and the creation of another form view for sc_task in which I added a section with fields that referenced the parent RITM.
They really seemed to like it, but no decisions have been made to move forward with it just yet.