add user or group if user is not active in user activity in workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:23 AM
i make workflow on requested item table then i add approval activity in that use user approval activity i select in active user now i want if user is in active then it check and another active user generate approver in requested item table how to fix this issue in servicenow
Thanks
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:51 AM
How do you know what user to select?
Start there.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 04:56 AM
i make user inactive and that inactive user i select in user activity
if i push any other user sys _id and test both approver are comming in requested item table
and
i write the script in advance
answer = [];
function isUserActive(userID) {
var user = new GlideRecord('sys_user');
if (user.get(userID)) {
return user.active == true;
}
return false;
}
var selectedUserID = 'a8f98bb0eb32010045e1a5115206fe3a';
if (isUserActive(selectedUserID)) {
answer.push(selectedUserID);
gs.info("Selected user is active.");
} else {
gs.info("Selected user is inactive.");
}
but how the script check that this is active user or not Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 05:08 AM
OR may i need to achive this by using something else
i do not know how to fix this issue
