Incident Related Link to Catalog Item – Conditional Display Based on Assignment Group Parent and Gro
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
14 hours ago
Hi Community,
I’m looking for guidance on configuring a Related Link on the Incident form with specific visibility conditions.
Requirement
I want to add a Related Link on the Incident form called:
Hardware Refresh Request
This Related Link should:
- Open a specific Catalog Item (hardware refresh request form).
- Only be visible when:
- The Incident’s Assignment Group parent is either:
- Global Field Support, or
- Regional Field Support
- AND the logged‑in user is a member of the Incident’s Assignment Group.
- The Incident’s Assignment Group parent is either:
Additional Notes
- The Related Link should not appear if either condition is not met.
- The catalog item can open in either Service Portal or Classic UI.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13 hours ago
something like this in UI action condition and script
gs.getUser().isMemberOf(current.assignment_group) && (current.assignment_group.parent == 'Global Field Support' || current.assignment_group.parent == 'Regional Field Support')
Client Checkbox - true
Onclick - hardwareRefreshCatalog()
UI action script
function hardwareRefreshCatalog() {
var catalogItemSysId = 'YOUR_CATALOG_ITEM_SYS_ID';
var incidentNumber = g_form.getUniqueValue(); // Pass incident number as parameter
// Service Portal (Recommended)
window.open('/sp?id=sc_cat_item&sys_id=' + catalogItemSysId + '&sysparm_incident=' + incidentNumber, '_blank');
// OR Classic UI
// window.open('/nav_to.do?uri=sc_cat_item.do?sys_id=' + catalogItemSysId, '_blank');
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
