Create REQ from a Work Order Task and Relate Records

Dillin  Bradley
Tera Expert

What is the best way to create a REQ from a Work order/Work order task? 

 

I was able to create a UI Action that I can create a REQ form but I'm having issues associating the records. 

 

The UI action to create a REQ from an INC makes the incident the Parent record but when I do it from the WOT or WO the parent record is left empty.

 

Here is the script I am using in the UI action.

 

//Update saves work order task before going to the catalog homepage
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;
}


action.setRedirectURL(url);
2 REPLIES 2

icahall1
Tera Contributor

I'd be curious what your use case is for creating a REQ from a Work Order Task. In terms of hierarchy, a REQ is higher up the chain than a Work Order Task (could even debate whether it's higher than a Work Order).

Hi @icahall1 

 

Thanks for your response! Many of our field techs get onsite and being the "IT" in the field they get bombarded with other issues and requests when they get onsite and generally will open up INCs or REQs for the things they cant fix or fulfill. It would just give us better tracking for things that were unreported to our Service Desk and other teams and our onsite techs get earfuls for issues they cant assist with. This would give us the reporting to see Issues and Requests created ONLY because of a FSM tech being on site and hopefully improve training for our end users.