script to trigger Event to remove disable user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:37 AM
Hi,
we keep the business rule for when a user becomes deactivated, and instead of the business rule updating the CI's level 1 approver group
(to remove member), trigger an event passing the CI and the disabled user... and the event logic will update the level 1 approver field to remove disabled user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:53 AM
what's your actual requirement?
assigned_to on cmdb_ci is reference field
Why in script you are doing split on it?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:54 AM
Assigned_to field type is List (customized field).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 04:05 AM
so that deactivated user should be removed from list field and that field should get updated again?
script is fine
what's not working?
event, notification and BR is on which table?
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2025 05:35 AM
event is not triggered, event created with cmdb_ci table.
script is fine, 4 users were listed in the assigned_to field, and all 4 users were deactivated at the same time.
In the end, two of the deactivated users ended up staying in the assigned_to field. Performance/locking issue...
To avoid this issue, instead of the business rule updating assigned_to field,trigger an event passing the CI and the disabled user.
in the above script, not triggering event.