Unable to map the ticket sys id as the parent of request submitted from the ticket via ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2023 08:00 AM
UI Action : Create request should redirect to a particular catalog item and after submission of the request it should map the sysid of the ticket from which the UI Action was triggered as the parent of the request submitted.
Below is the script am using in UI Action but no luck. Can anyone help in fixing this?
UI Action :
new x_usbna_cf_csm.CF_Hide_Buttons().createRequest(current,action);
Script include:
createRequest: function(current, action) {
current.update(); var url = "mytech?id=sc_cat_item&sys_id=6565043adb5f37c065d98fd3399619bf&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
action.setRedirectURL(url);
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 05:17 AM
I am using this code in my PDI to redirect to a Catalog Item in the standard Service Catalog catalog, and it is populating the Parent field on the REQ when called from an Incident:
current.update();
var url = "com.glideapp.servicecatalog_cat_item_view.do?sysparm_id=964185f78726a9100b25986d3fbb35c1&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
action.setRedirectURL(url);
Are you seeing an info message/link like this when it redirects to the Catalog Item?
Try your same code directly in the UI Action script field, not a Script Include to see if that works.