How To populate RITM assignment_group based on sctask assignment group field?

karishmashaik
Kilo Expert

Hi all,

I have small Requirement, How To populate RITM assignment group based on catalog task assignment group field,

same groups populate in Ritm based on catalog task assignment group field.

please Help me on this

Thanks,

Karishma.

 

1 ACCEPTED SOLUTION

Shakeel Shaik
Giga Sage
Giga Sage

Hi @karishmashaik ,

 

 You want to populate same catalog task assignment group in RITM assignment Group??

if Yess, then 

Create BR

Script:

(function executeRule(current, previous /*null when async*/ ) {

    var ritm = new GlideRecord('sc_req_item');
    ritm.addQuery('sys_id', current.request_item);
    ritm.query();
    if (ritm.next()) {
        ritm.assignment_group = current.assignment_group; 
		ritm.update();
    }


})(current, previous);

 

If my response is helpful, then Please mark as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

 

Thanks,
Shakeel Shaik 🙂

View solution in original post

9 REPLIES 9

Shakeel Shaik
Giga Sage
Giga Sage

Hi @karishmashaik 

 

I just now answered the same question.

Please check

https://community.servicenow.com/community?id=community_question&sys_id=6d4feb6b1bda4150ccc253da234b...

 

 

 

If my response is helpful, then Please mark as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

 

Thanks,
Shakeel Shaik 🙂

Hi @karishmashaik ,

 

 You want to populate same catalog task assignment group in RITM assignment Group??

if Yess, then 

Create BR

Script:

(function executeRule(current, previous /*null when async*/ ) {

    var ritm = new GlideRecord('sc_req_item');
    ritm.addQuery('sys_id', current.request_item);
    ritm.query();
    if (ritm.next()) {
        ritm.assignment_group = current.assignment_group; 
		ritm.update();
    }


})(current, previous);

 

If my response is helpful, then Please mark as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

 

Thanks,
Shakeel Shaik 🙂

Shakeel Shaik
Giga Sage
Giga Sage

Hi @karishmashaik ,

 

 You want to populate same catalog task assignment group in RITM assignment Group??

if Yess, then 

Create BR

Script:

(function executeRule(current, previous /*null when async*/ ) {

    var ritm = new GlideRecord('sc_req_item');
    ritm.addQuery('sys_id', current.request_item);
    ritm.query();
    if (ritm.next()) {
        ritm.assignment_group = current.assignment_group; 
		ritm.update();
    }


})(current, previous);

 

If my response is helpful, then Please mark as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

 

Thanks,
Shakeel Shaik 🙂

Hi @karishmashaik 

 

 

If my response is helpful, then Please mark as Correct Answer/Helpful.

Please check and let us know.

Thanks 🙂

Shakeel Shaik.

Thanks,
Shakeel Shaik 🙂

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

what happens if there are multiple catalog tasks?

which group to populate?

what's the business requirement?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader