(Group name and Email) of each catalog task associated with each RITM and for Incidents.

Sai Krishna6147
Mega Guru

Requirement:

The system shall show the assignment group's name and contact details responsible for handling each request or incident at the RITM level. 

Acceptance Criteria:

The name of the assignment group is displayed next to each RITM in "My Records." 

Additional contact information (Email) for the assignment group is accessible if needed. 

3 ACCEPTED SOLUTIONS

VishaalRanS
Tera Guru

Hi @Sai Krishna6147 

 

To Show assignment group name and contact details for each RITM in the "My Records" section of ServiceNow. Try Following the Steps:

 

  1. Display Assignment Group Name:
    • Modify UI policies or forms to add a field that displays the assignment group name next to each RITM.
  2. Access to Contact Information:
    • Provide additional contact details (e.g., email) via a related link or tooltip when hovering over or clicking the assignment group name.

Implementation Steps

  1. Modify RITM Form/View:
    • Add Assignment Group Field: Use the form designer to include the assignment group field.
    • Script for Assignment Group: Implement a script in the workflow to set the assignment group based on specific criteria.

 

  1. Displaying Information in "My Records":
    • UI Configuration: Modify the "My Records" UI to include a column for the assignment group name.
  2. Accessing Contact Information:
    • Create a Contact Information Field: Add a field for the assignment group's contact details in the RITM record.
    • Display Logic: Use client scripts to enable contact detail access via hover or click actions.

Thanks, and Regards

Vishaal

Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

Manikanta Kota
Mega Guru

Hi @Sai Krishna6147 ,

You are asking a Custom Widget To Display Assignment Group and Its Contact ?

View solution in original post

Manikanta Kota
Mega Guru

Hi @Sai Krishna6147 ,

 

If you want to Customize a Widget In service portal You need Servier side script , HTML, CSS You can use below script -Server Side Script

var item = {};
var assignmentGroup=[];


data.table = gr.getTableName();
data.sys_id = gr.getUniqueValue();
var tab=gr.getTableName();

if(tab == ('incident')){

var inc = new GlideRecord('incident');
inc.addQuery("active",'true');
inc.addQuery("sys_id", data.sys_id);
inc.query();

while (inc.next()) {
item.assignment_group = inc.assignment_group.getDisplayValue();
assignmentGroup = inc.assignment_group.getRefRecord();
if (assignmentGroup.isValidRecord()) {
//console.log(assignmentGroup.getValue('u_contact'));
item.email = assignmentGroup.getValue('u_contact');
} else {
item.email = 'No Email Found';
}
tasks.push(item);
}
}
if( tab == 'sc_req_item'){
var tsk = new GlideRecord('sc_task');
tsk.addQuery("active",true);
tsk.addQuery("request_item", data.sys_id);
tsk.query();

while (tsk.next()) {
item.assignment_group = tsk.assignment_group.getDisplayValue();
assignmentGroup = tsk.assignment_group.getRefRecord();
if (assignmentGroup.isValidRecord()) {
item.email = assignmentGroup.getValue('u_contact');
} else {
item.email = 'No Email Found';
}
tasks.push(item);
}



}

data.tskFields = tasks;

// console.log("ss" + data.tskFields[0].item.assignment_group);
})();
//})();

 

View solution in original post

5 REPLIES 5

VishaalRanS
Tera Guru

Hi @Sai Krishna6147 

 

To Show assignment group name and contact details for each RITM in the "My Records" section of ServiceNow. Try Following the Steps:

 

  1. Display Assignment Group Name:
    • Modify UI policies or forms to add a field that displays the assignment group name next to each RITM.
  2. Access to Contact Information:
    • Provide additional contact details (e.g., email) via a related link or tooltip when hovering over or clicking the assignment group name.

Implementation Steps

  1. Modify RITM Form/View:
    • Add Assignment Group Field: Use the form designer to include the assignment group field.
    • Script for Assignment Group: Implement a script in the workflow to set the assignment group based on specific criteria.

 

  1. Displaying Information in "My Records":
    • UI Configuration: Modify the "My Records" UI to include a column for the assignment group name.
  2. Accessing Contact Information:
    • Create a Contact Information Field: Add a field for the assignment group's contact details in the RITM record.
    • Display Logic: Use client scripts to enable contact detail access via hover or click actions.

Thanks, and Regards

Vishaal

Please mark this response as correct or helpful if it assisted you with your question.

thullurishalini
Kilo Guru

Hi @Sai Krishna6147 
please find the below steps:

To achieve this in ServiceNow, 

  1. Modify the RITM Form Layout:

    • Navigate to the RITM form layout.
    • Add a field for the Assignment Group if it’s not already present.
  2. Display Assignment Group in “My Records”:

    • Go to the “My Records” view.
    • Customize the list layout to include the Assignment Group field.
  3. Add Contact Information:

    • Ensure that the Assignment Group table has the necessary contact information (like Email).
    • Create a Business Rule or Client Script to fetch and display this information when needed.

Detailed Steps:

  1. Modify RITM Form Layout:

    • Navigate to System Definition > Tables.
    • Search for the sc_req_item table.
    • Open the form layout and add the Assignment Group field if it’s not already there.
  2. Customize “My Records” View:

    • Navigate to Self-Service > My Requests.
    • Click on the gear icon to personalize the list layout.
    • Add the Assignment Group field to the list layout.
  3. Fetch and Display Contact Information:

    • Ensure the Assignment Group table (sys_user_group) has the Email field populated.
    • Create a Business Rule or Client Script to fetch the email address of the Assignment Group and display it when needed.

Example Client Script:

JavaScript
 
(function executeRule(current, previous /*null when async*/) {
    var group = new GlideRecord('sys_user_group');
    if (group.get(current.assignment_group)) {
        current.u_assignment_group_email = group.email;
    }
})(current, previous);
Preview
Thanks ,
Shalini.
 

Manikanta Kota
Mega Guru

Hi @Sai Krishna6147 ,

You are asking a Custom Widget To Display Assignment Group and Its Contact ?

Manikanta Kota
Mega Guru

Hi @Sai Krishna6147 ,

 

If you want to Customize a Widget In service portal You need Servier side script , HTML, CSS You can use below script -Server Side Script

var item = {};
var assignmentGroup=[];


data.table = gr.getTableName();
data.sys_id = gr.getUniqueValue();
var tab=gr.getTableName();

if(tab == ('incident')){

var inc = new GlideRecord('incident');
inc.addQuery("active",'true');
inc.addQuery("sys_id", data.sys_id);
inc.query();

while (inc.next()) {
item.assignment_group = inc.assignment_group.getDisplayValue();
assignmentGroup = inc.assignment_group.getRefRecord();
if (assignmentGroup.isValidRecord()) {
//console.log(assignmentGroup.getValue('u_contact'));
item.email = assignmentGroup.getValue('u_contact');
} else {
item.email = 'No Email Found';
}
tasks.push(item);
}
}
if( tab == 'sc_req_item'){
var tsk = new GlideRecord('sc_task');
tsk.addQuery("active",true);
tsk.addQuery("request_item", data.sys_id);
tsk.query();

while (tsk.next()) {
item.assignment_group = tsk.assignment_group.getDisplayValue();
assignmentGroup = tsk.assignment_group.getRefRecord();
if (assignmentGroup.isValidRecord()) {
item.email = assignmentGroup.getValue('u_contact');
} else {
item.email = 'No Email Found';
}
tasks.push(item);
}



}

data.tskFields = tasks;

// console.log("ss" + data.tskFields[0].item.assignment_group);
})();
//})();