Assignment group sys_id

servicenow14710
Tera Expert

Can we get sys_id of assignment group of change request through business rule . If so, can you please share the script. or any suggestions.Thanks.

3 REPLIES 3

newhand
Mega Sage

@servicenow14710 
try this.

 

(function executeRule(current, previous /*, gs */) {
  // Get the sys_id of the assignment group
  var assignmentGroupSysId = current.assignment_group.toString();

  // Do something with the assignment group sys_id
  gs.info("Assignment Group Sys ID: " + assignmentGroupSysId);
})(current, previous /*, gs */);

 

Please mark my answer as correct and helpful based on Impact.

Nayan  Dhamane
Kilo Sage
Kilo Sage

Hello @servicenow14710 ,

If you running the business rule on change request table then just use current.assignment_group to access sys_id of assignment group.

If you are running it on any other table than just use the Glide record query to get it.

 

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.

Hello @servicenow14710 ,

I am glad that the solution provided by me helped you. Could you please mark it as correct as it will close the thread and help others as well.

If my answer solved your issue, please mark my answer as Correct & Helpful based on the Impact

Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.