How to trigger event from business rule to remove deactivated users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:19 AM
Hi,
I have requirement to create business rule - remove deactivated users from assigned_to field(list type) from the table cmdb_Ci.
I want to trigger event passing CI(configuration item name) and deactivated user value and the event should remove disabled user from the field assigned_to. please advise me the script.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:48 AM
Assuming the trigger is when a user in the sys_user table is set to inactive?
Create a Business Rule on the sys_user table which triggers on AFTER, where the "Active" field changes to "False":
Configure the "Script" field in the Advanced tab with a simple query:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 03:57 AM
Thanks for reply, My Assigned_to field type is list..it contains many users. my client asked to - trigger event passing CI name, disabled user name. this event should remove deactivated user from assigned_to field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2025 04:06 AM
please avoid creating duplicate questions.
script to trigger Event to remove disable user
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader