Agent Workspace for HR - Client script not working to make field mandatory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 09:42 AM - edited 05-21-2024 09:44 AM
Hello,
My organization is the midst of a project to migrate from the legacy HR Agent Workspace to the new Agent Workspace for HR. This involves activating a new plugin, which creates a new scope for the UIB-based workspace.
In the legacy workspace, we have a simple client script running on Interaction records that evaluates the type of interaction and the current view of the user, then sets a custom choice field to mandatory.
We are using a Client Script instead of a UI Policy because that allows us to create the record in a scope we in HR own instead of Global. Note the Application is in the old HR Workspace scope and the View is set to the legacy view for interactions delivered to the legacy HR Workspace.
I have copied this client script to the new scope that goes with the new Agent Workspace for HR plugin:
Note that the two scripts are identical except for the scope and the new view. So the functionality should just transfer over. But when I look at an interaction, the script does not kick in for the new view, only the old.
Here is the field being made mandatory in the legacy view under the old client script:
Here is that same interaction record viewed under the new view, but the field is not made mandatory:
Any advice on why this is happening? Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 09:52 AM
did you check the onLoad is triggering or not?
Is that contact type field printing value in alert?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader