Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Related List Assign To Me action

MichaelH5716707
Tera Guru

I am looking for any guidance on creating a Action for a related list that will allow to assign all the tasks to me. I know I can assign a current task using the UI action but curious about the approach to add all in a list and not having to right-click each item to assign. I currently have an embedded list in sc_req_item record that looks for all items under the same REQ and assigned to the same group. I am looking for a easy way for the support group to just grab all tickets instead of one by one

1 REPLY 1

Sumanth16
Kilo Patron

Hi @MichaelH5716707 ,

update script as below and test once:

var gr = new GlideRecord('sys_user');

gr.get(gs.getUserID());
current.assigned_to = gs.getUserID();
current.assignment_group = gr.getValue('u_primary_group');
current.update();
action.setRedirectURL(current);

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda