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-07-2023 09:33 AM
Is anything happening - redirecting to the correct Catalog Item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2023 12:34 AM
Yes it is redirecting to catalog item, that part is fine. But I want that submitted request to be tagged under my ticket ie the parent of the request should be the ticket number from where this UI Action initiated. That part is not happening
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 06:26 AM
Check to confirm that this UI Action is populating the Parent field on the first record that is created - the REQ. If so, then you just need a before Insert Business Rule on the sc_req_item table to populate the RITM Parent with the same.
(function executeRule(current, previous /*null when async*/) {
current.parent = current.request.parent;
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2023 07:51 AM
No, it isnt populating the parent field on the REQ which gets created from the UI Action