Issue with "Transfer" UI Action on Task Table After Universal Request Plugin – Blocked by Mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 01:23 AM
Hi All,
We're currently facing an issue with the "Transfer" UI Action on the task table after enabling the Universal Request plugin in our instance.
This UI action works only when the Assignment Group field is empty on the related sc_req_item (Request Item) record. However, in our environment, the Assignment Group field on the sc_req_item table is made mandatory through customization, and it's automatically populated when a request is submitted.
Has anyone faced this issue or knows:
How the "Transfer" UI Action is conditionally controlled?
Is there a recommended way to customize or override this behavior while still aligning with Universal Request best practices?
Any guidance or suggestions are appreciated.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 02:23 AM
you can update the OOTB UI action condition such that it handles the sc_req_item differently
Override the function "canRoutePrimaryTask" in the script include "UniversalRequestUtils"
Something like this, but please enhance it as per your requirement
1) if the table is RITM then check if both group and assigned to are populated or not
canRoutePrimaryTask: function(departmentTicketGr) {
if (!this.canReadServiceSets())
return false;
if (!(departmentTicketGr.active && this.isTaskPrimaryDepartmentTicket(departmentTicketGr)))
return false;
if (departmentTicketGr.sys_class_name != "sc_req_item" && departmentTicketGr.assignment_group.nil() && departmentTicketGr.assigned_to.nil())
return departmentTicketGr.canWrite() && (departmentTicketGr.requested_for != gs.getUserID());
else if (departmentTicketGr.sys_class_name == "sc_req_item" && departmentTicketGr.assignment_group && departmentTicketGr.assigned_to)
return departmentTicketGr.canWrite() && (departmentTicketGr.requested_for != gs.getUserID());
else
return this.isUserMemberOfAssigmentGroup(departmentTicketGr);
},
refer below link(s) for help
How to Extend the Script Include With Your Custom Made Script Include?
How to extend an existing Class in a new script include
How to Extend a Script Include
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 06:41 AM
Hi @Ankur Bawiskar ,
The issue doesn't seem to be related to the condition on the UI action. We already updated the condition, and the 'Transfer' UI action is now visible even when the RITM's assignment group is not empty. However, when we click on the UI action, the page loads indefinitely and nothing happens. We also tested this in the PDI environment and encountered the same behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 07:20 AM
so it's some other issue.
Did you check by debugging?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 09:53 PM
I don’t believe the issue is related to anything else, as the UI Action works correctly when we clear the Assignment Group field. This indicates that the problem is specifically caused by the Assignment Group field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 09:56 PM
then you will have to debug by adding some logs in the script which handles this?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader