Add link to on-call record next to assignment group on the incident tickets??

Selva Arun
Mega Sage
Mega Sage

Hi All,

 

Has anyone implemented the below requirements:

 

Add link to on-call record next to assignment group on the incident tickets.

 

I followed the https://servicenowguru.com/ui-macros/on-call-calendar-popup-ui-macro/# and made few modifications, but UI macro icon is not showing up on the form.

Please advise.

<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
    <span id="${jvar_n}" class="btn btn-default icon-date-time" tabindex="0" title="${gs.getMessage('Show group on-call schedule')}">
        <span class="sr-only">${gs.getMessage('Show group on-call schedule')}</span>
    </span>
    <script>
        function showOnCallSchedule(reference) {
            // Get the current group
            var group = g_form.getValue(reference.split('.')[1]);

            // Query to see if an on-Call rotation exists
            var grpRota = new GlideRecord('cmn_rota');
            grpRota.addQuery('group', group);
            grpRota.addQuery('active'true);
            grpRota.query();

            if (grpRota.hasNext()) {
                // Construct a URL for the popup window
                var url = 'show_schedule.do?sysparm_type=roster&amp;sysparm_zoom=weekly&amp;sysparm_group_id=' + group;

                // Open the popup
                popupOpenStandard(url);
            } else {
                alert('No active rotation specified for the selected group.');
            }
        }
    </script>
</j:jelly>

 

2 ACCEPTED SOLUTIONS

Selva Arun
Mega Sage
Mega Sage

I fixed the issue by myself after modifying the jelly script and the dictionary override. Thank you!

View solution in original post

8 REPLIES 8

Selva Arun
Mega Sage
Mega Sage

I fixed the issue by myself after modifying the jelly script and the dictionary override. Thank you!

Could you please share what exactly you have changed to solve the issue? This could be helpful for other community members.

Sure, I will post an article on the community!