- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 07:45 AM
Hi,
After query to the right oldvalue, I can't put related assignment group to an incident:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 08:37 AM
Thank you Chaitanya,
I found the way to put the assignment group by use a look up sys ID record of the sys_user_group table and place the look up record in the assignment group field on the incident update record
Kind regards,
Sebastien
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 08:15 AM
Hi @Sebastien C ,
var gr = new GlideRecord('sys_audit');
gr.addQuery('tablename', 'incident');
gr.addquery('fieldname', 'assignment_group');
gr.addQuery('documentkey', fd_data._2__look_up_record.record.sys_id);
gr.orderByDesc('sys_created_on');
gr.query();
if (gr.next()) {
previousAssignmentGroup = gr.getValue('oldvalue');
}
return previousAssignmentGroup;
Try this with getValue()
if doesn't work please share the screenshots of what you are seeing
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 08:37 AM
Thank you Chaitanya,
I found the way to put the assignment group by use a look up sys ID record of the sys_user_group table and place the look up record in the assignment group field on the incident update record
Kind regards,
Sebastien