- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 09:47 AM
I am attempting to add the Reactivate User UI button to HR Agent Workspace: HR Profile. I am able to get the button to display, but I am having trouble getting it to actually do anything. I have tried several entries in Workspace Client Script on the Workspace tab in the UI Action.
Here is what I currently have:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 04:51 PM - edited 01-08-2024 06:06 PM
@Brian Shacklefo , Thank you for reaching out.
Please see if below helps.
Server Script
var grUser = new GlideRecord('sys_user');
grUser.get(current.getValue('user'));
grUser.setValue('active', true);
grUser.update();
current.setValue('sys_updated_by' , gs.getUserName());
current.update();
action.setRedirectURL(current);
Condition
!current.user.active && gs.hasRole("sn_hr_core.profile_writer")
While testing on the workspace there was an issue. Lines 5 and 6 are used to fix that.
There are other ways, but more cumbersome.
Please accept the solution if it resolved your query, or mark helpful if this helped.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 10:07 AM
This worked wonderfully. I only made one adjustment in the configurations (Form button = False) since there is already a Reactivate User UI Action available in the platform (backend) view.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 10:57 AM
@Brian Shacklefo , glad it helped.
Thank you for reaching out.