- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 07:41 AM
Similar to Incidents -'Show Related Incidents' icon, I would like to have one to 'Show Related Requests' on the requested items.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 08:48 AM
Hi Norton,
Take a look at the UI Macro called user_show_incidents. If you look at the caller field dictionary entry, you will see in the Attributes field a line like this: ref_contributions=user_show_incidents. The Reference Contributions statement is telling ServiceNow to add user_show_incidents UI Macro to the Caller field as a reference contribution (the icon and associated behavior that you see).
If you copy that Macro, call it user_show_requests, change the macro to pull requests instead, and add user_show_requests to the reference contribution string (ref_contributions=user_show_incidents;user_show_requests) you should see the desired result.
Please let me know if you need additional assistance.
Kind regards,
Travis Toulson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 08:48 AM
Hi Norton,
Take a look at the UI Macro called user_show_incidents. If you look at the caller field dictionary entry, you will see in the Attributes field a line like this: ref_contributions=user_show_incidents. The Reference Contributions statement is telling ServiceNow to add user_show_incidents UI Macro to the Caller field as a reference contribution (the icon and associated behavior that you see).
If you copy that Macro, call it user_show_requests, change the macro to pull requests instead, and add user_show_requests to the reference contribution string (ref_contributions=user_show_incidents;user_show_requests) you should see the desired result.
Please let me know if you need additional assistance.
Kind regards,
Travis Toulson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2015 09:12 AM
Owe you a beer Travis!! Thank you....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2015 08:38 PM
Hi Travis
I have followed this great little tip that you have shared, including:
- creating the new UI_macro and called it user_show_requests
- included it on my Caller_ID field as an attribute using ref_contributions=user_show_incidents;user_show_requests but unfortunately my pop up windows for both icons end up only displaying the contents of the last UI_macro i.e. if I change it to ref_contributions=user_show_requests;user_show_incidents then it will show incident records
Do you know how I can go about correcting this please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2015 07:22 AM
Hi Anna,
You will likely need to change the function name within the UI Macro. The user_show_incidents Macro has a function named showRelatedList that you can see defined on line 13 and used in the onclick on line 6. That function hard codes the table list to open up, so whichever Macro is included last in the ref_contributions is the Macro who's function gets used. Both scripts are executed in the browser, so the latter function overwrites the first one at runtime.
Please let me know if that doesn't work or if something about it is still confusing.
Kind regards,
Travis