
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 09:56 AM
Hi Everyone,
I have created a notification on the Business Service table to trigger whenever any of the Business Owners (e.g., 'Owned by' or 'Managed by') become inactive. Here’s what I added the conditions:
Condition 1: Run when "Updated"
Condition 2:'Owned by.Active' is false OR 'Managed by.Active' is false etc..
However, the notification isn’t firing when a business owner becomes inactive. The fields 'Owned by' and 'Managed by' reference users, so I expected this to work when their status changes to inactive. Am I missing something in how the condition or trigger works for reference fields? How can I ensure this notification fires correctly?
Regards,
Sowmya Maradana
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 12:30 AM
Hi @Community Alums ,
Yes, Your notification on the Business Service table but update happens on the user table so it wouldn't trigger.
You may have to create a Business Rule or a Flow designer on the user table when user becmes inactive check if inactive user is owner of the any business service if yes call the notification
I would recommed to use flow designer for its low code capibility.
Hope this helps!!!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 02:38 AM
Hi @Community Alums ,
Here’s how you can create a Business Rule on the sys_user table that triggers a notification when a user becomes inactive, and they are associated with any Business Service record.
Steps to create the Business Rule:
1. Navigate to Business Rules:
• Go to System Definition → Business Rules in ServiceNow.
2. Create a new Business Rule:
•Click on New to create a new Business Rule.
3. Set the Basic Information:
• Name: Notify Business Service Owners Inactive
• Table: sys_user
•When: After
•Update: Check the box for Update (since we want to catch when a user is updated).
4. Filter Condition:
•Set the condition to check when the user becomes inactive:
Active is false
5. Script: Use this script to check if the user is linked as ‘Owned by’ or ‘Managed by’ in any Business Service record.
(function executeRule(current, previous) {
// Check if the user status has changed to inactive
if (previous.active && !current.active) {
// Query the Business Service table for records where the user is 'Owned by' or 'Managed by'
var businessServiceGR = new GlideRecord('cmdb_ci_service');
businessServiceGR.addQuery('owned_by', current.sys_id);
businessServiceGR.addOrCondition('managed_by', current.sys_id);
businessServiceGR.query();
while (businessServiceGR.next()) {
// Trigger a notification for each Business Service record the user is associated with
gs.eventQueue('business_service.owner_inactive', businessServiceGR, current.sys_id, null);
}
}
})(current, previous);
Steps to Create a Notification:
1. Navigate to Notifications:
• Go to System Notification → Notifications.
2. Create a new Notification:
• Table: Business Service [cmdb_ci_service]
•Condition: Add any additional conditions if required, but you can leave it blank as the event will only trigger for the inactive owners.
3. Who will receive:
•Specify who should receive the notification (e.g., Business Owners, System Admin, etc.).
4. Message:
•You can configure the email subject and body based on your needs.
I would appreciate if you can mark this response as correct or helpful if it helped you with your question.
Thanks,
Aryan Jain

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 12:30 AM
Hi @Community Alums ,
Yes, Your notification on the Business Service table but update happens on the user table so it wouldn't trigger.
You may have to create a Business Rule or a Flow designer on the user table when user becmes inactive check if inactive user is owner of the any business service if yes call the notification
I would recommed to use flow designer for its low code capibility.
Hope this helps!!!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2024 02:38 AM
Hi @Community Alums ,
Here’s how you can create a Business Rule on the sys_user table that triggers a notification when a user becomes inactive, and they are associated with any Business Service record.
Steps to create the Business Rule:
1. Navigate to Business Rules:
• Go to System Definition → Business Rules in ServiceNow.
2. Create a new Business Rule:
•Click on New to create a new Business Rule.
3. Set the Basic Information:
• Name: Notify Business Service Owners Inactive
• Table: sys_user
•When: After
•Update: Check the box for Update (since we want to catch when a user is updated).
4. Filter Condition:
•Set the condition to check when the user becomes inactive:
Active is false
5. Script: Use this script to check if the user is linked as ‘Owned by’ or ‘Managed by’ in any Business Service record.
(function executeRule(current, previous) {
// Check if the user status has changed to inactive
if (previous.active && !current.active) {
// Query the Business Service table for records where the user is 'Owned by' or 'Managed by'
var businessServiceGR = new GlideRecord('cmdb_ci_service');
businessServiceGR.addQuery('owned_by', current.sys_id);
businessServiceGR.addOrCondition('managed_by', current.sys_id);
businessServiceGR.query();
while (businessServiceGR.next()) {
// Trigger a notification for each Business Service record the user is associated with
gs.eventQueue('business_service.owner_inactive', businessServiceGR, current.sys_id, null);
}
}
})(current, previous);
Steps to Create a Notification:
1. Navigate to Notifications:
• Go to System Notification → Notifications.
2. Create a new Notification:
• Table: Business Service [cmdb_ci_service]
•Condition: Add any additional conditions if required, but you can leave it blank as the event will only trigger for the inactive owners.
3. Who will receive:
•Specify who should receive the notification (e.g., Business Owners, System Admin, etc.).
4. Message:
•You can configure the email subject and body based on your needs.
I would appreciate if you can mark this response as correct or helpful if it helped you with your question.
Thanks,
Aryan Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 06:46 AM
Could this be use to flag non IT Owners?