I need to set the Priority of Tasks which would be same as RITM priority
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018 12:59 AM
When a catalog item is raised, based on some criteria, the priority of RITM gets changed. Now the Tasks are getting generated with default p4. I need to set te Priority of these Tasks to be same as RITM Priority.
This is code which i tried using BR.
function onBefore(current, previous) {
var gr = new GlideRecord('sc_task');
gr.addActiveQuery();
gr.addQuery('request_item',current.sys_id);
gr.query();
if(gr.next()){
gr.priority= 3;
gr.update();
}
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018 04:27 AM
Am unable to add the code in the create task.... it is a choice, we don't have condition field over to put it....