Assignment group and asisgned to getting blank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Everyone,
We have noticed that when we are moving the Incident state from In progress to Confirming, the assignment group and assigned to is getting blank. it's updating to empty.
Investigation done from my side:
- Previously the two fields are "u_opeleader_grp and u_opeleader" hidden, then it was not working fine. I have made it visible and then again hidden then it is working fine again.(These two are custom fields)
- There are a two custom client scripts using the custom fields. (MISOL_Opeleader and MISOL_SecGrp) for Incident table to fill the fields.
The configurations and everything is fine. When I made it visible and hidden it was not working fine.
Can anyone help me why could this happen.
Best Regards,
Nageshwari P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Possible Causes
Hidden fields not initialized – Since u_opeleader_grp and u_opeleader are hidden, they may not load their values, so scripts referencing them end up copying blanks.
Client script overwriting values – Custom scripts (MISOL_Opeleader, MISOL_SecGrp) may directly set assignment_group and assigned_to from those hidden fields without checking if values exist.
Form visibility behavior – When the fields are made visible once, their values load properly. Hiding them again still retains values, which is why it “worked” after toggling visibility.
No validation checks in scripts – The scripts don’t check if u_opeleader_grp / u_opeleader are empty before setting assignment fields.
Logic in client scripts instead of server-side – Since the assignment logic is client-side, it depends on UI behavior (field visibility), making it unreliable.
Update logic in client scripts :
var grp = g_form.getValue('u_opeleader_grp');
var usr = g_form.getValue('u_opeleader');
if (grp) {
g_form.setValue('assignment_group', grp);
}
if (usr) {
g_form.setValue('assigned_to', usr);
}
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Is that a new state value and you are having custom logic to handle that?
both the fields getting blank -> did you check on list if both the fields are populated but on form both are getting blank?
If yes then some client script or UI policy is clearing those.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader