- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2024 07:59 AM
Hi Team,
Is there a way I can create a Work Order by clicking on the title Bar of a RITM or SCTASK and then clicking on it as an option? It would be similar to how it is with a Problem record like in the screenshot.
Also I would like to take some of the information in the RITM/SCTASK and use it auto-populate some of the fields of the Work Order (like for example the description, short-description, and configuration item). What would be the best way to do this?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 03:06 AM
Hi @MRPack ,
OOB is not available but you can make it very easily.
Follow below steps.
- Create New ui action called "Create Work Order" on RITM and SC_TASK table.
- In Script put below code.
current.update();
wmu = new WorkManagementInitiation();
wmu.createWorkOrderFromRitm(current);
- Open script include "WorkManagementInitiation".
- Add new function like below.
createWorkOrderFromRitm: function(ritm) {
var workOrder = this._retrieveWorkOrder(true, ritm, true);
// work order already exists and redirection is already handled
if (workOrder == null)
return;
// complete the work order definition and creation
workOrder.location = ritm.short_description;
workOrder.description = ritm.description;
workOrder.insert();
// redirect to new work order
this._redirectToNewWorkOrder(workOrder, ritm);
return workOrder;
},
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 02:25 AM
HI @MRPack ,
Have you managed to find a solution to this using OOB configurations?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2024 03:06 AM
Hi @MRPack ,
OOB is not available but you can make it very easily.
Follow below steps.
- Create New ui action called "Create Work Order" on RITM and SC_TASK table.
- In Script put below code.
current.update();
wmu = new WorkManagementInitiation();
wmu.createWorkOrderFromRitm(current);
- Open script include "WorkManagementInitiation".
- Add new function like below.
createWorkOrderFromRitm: function(ritm) {
var workOrder = this._retrieveWorkOrder(true, ritm, true);
// work order already exists and redirection is already handled
if (workOrder == null)
return;
// complete the work order definition and creation
workOrder.location = ritm.short_description;
workOrder.description = ritm.description;
workOrder.insert();
// redirect to new work order
this._redirectToNewWorkOrder(workOrder, ritm);
return workOrder;
},
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2025 08:21 AM
Thanks @Runjay Patel ,
This solution works for me as I am able to create the UI Action and Scripts needed for it.