- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 07:57 PM
Hi all,
Need your help in what could be wrong in the below code.
the expected result is when assignment group gets changed the assigned_to field value should be updated with a random person from the group however im not getting the result.
Appreciate your help.
SI:
Please consider only assignMembers function
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 11:59 PM
Thanks, as you can see, there is an error. Cannot read properties of null (reading length). Also before that error you can see null was logged, so member is null. Looking at your GlideAjax call again, you need to use sysparm_name when specifying the method to call, not just sysparm:
ga.addParam('sysparm_name', 'assignMembers'); // update this to be 'sysparm_name' instead of just 'sysparm'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:38 AM
From Script Include we are using while loop to send an array of users in a group and then we set a random value from the array in client script -- this is the logic but unable to execute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2024 08:10 PM
try the suggestion shared by Nick and share us the updates.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader