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.

How to query assignment group from tasks table?

zsquared
Tera Contributor

Hello,

I am trying to query the assignment_group in my tasks table but I think I am hitting an error due to my lack of understanding the user groups.  

I want to filter for the assignment group called AOM-OU. I tried replacing assignment_group with sys_user_group since I noticed that this was a reference field in the form.

var tasks = new GlideRecord('sc_task');

tasks.addQuery('sys_user_group', 'AOM-OU');

tasks.query();

This should be a simple query but I'm not sure where I am going wrong...

1 ACCEPTED SOLUTION

Deepak Kumar5
Kilo Sage
  1. var tasks = new GlideRecord('sc_task');  
  2. tasks.addQuery('assignment_group', 'sys_ID');   //sys Id of assignment group
  3. tasks.query();

View solution in original post

11 REPLIES 11

Thanks a ton Zhen,very well explained... I got the doubts cleared without having to ask any further question... thanks for your time


No problem