How to copy Region field from incident to REQ & RITM & SC Task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
If a request created from an Incident how i can copy region field to REQ & then RITM & then SC Task?
Thanks in advance.
Regards,
Juganta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi @jugantanaya
From Incident to REQ:
Step1 : Update Create Request UI action script . There is 2 UI action with same name. Make sure you are updating correct one.
OOB code :
current.update();
var url;
var activeCatalogsCount = sn_sc.Catalog.getCatalogCount();
if (activeCatalogsCount === 1) {
url = "catalog_home.do?sysparm_view=catalog_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}
else {
url = "catalogs_home.do?sysparm_view=catalogs_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}
Customized Code:
current.update();
var url;
var activeCatalogsCount = sn_sc.Catalog.getCatalogCount();
if (activeCatalogsCount === 1) {
url = "catalog_home.do?sysparm_view=catalog_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id + '&sysparm_region=' + current.u_region;
}
else {
url = "catalogs_home.do?sysparm_view=catalogs_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id + '&sysparm_region=' + current.u_region;
}
Step2: On the specific Catalog Item, create an onLoad() script to pull that value into a variable.
function onLoad() { var url = top.location.href; var region = new URLSearchParams(url).get('sysparm_region'); if (region) { g_form.setValue('req_region', region); // 'req_region' is your variable name } }
From Req to RITM, SCTASK :
Dot Walking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
you can use the flow which is triggering on that catalog item to update the REQ,RITM with that INC Region
This will ensure you follow low-code, no-code approach
The REQ will have INC as it's parent so that's how you can grab the INC
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
