Service request created from an Incident via Service Portal is not having Parent as Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 04:28 AM
Hello,
I have a requirement to create a service request from an incident using the OOTB UI action called 'Create Request'. When we click on the create request button, it should re-direct to service portal category page to choose desired catalog item, instead of re-directing to backend UI page of 'catalog_home.do' page.
I have amended the UI action to re-direct to Service portal and incident is getting created. However, parent of request is not getting set by incident number. If we create request from the backend UI using the catalog_home.do page, it's setting incident in the parent of the created service request.
Can anyone tell me how to set the Parent of the request as incident when request created from Incident via service portal?
Updated the UI action code as below:
-------------------------------------------------------------------------------------------------------------------------------------
//Update saves incidents before going to the catalog homepage
current.update();
var url;
var activeCatalogsCount = sn_sc.Catalog.getCatalogCount();
if (activeCatalogsCount === 1) {
url = "/sp?id=sc_category&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}
else {
url = "/sp?id=sc_category&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
}
action.setRedirectURL(url);
-------------------------------------------------------------------------------------------------------------------------------------
Thanks in advance.
Thanks!
Vikas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2024 11:35 PM