Client Script not working in Agent WorkspaceIssue Two scenarios that cause Client Scripts not to work, in Agent Workspace, are discussed in this article: Scenario 1: Client Script not working in Agent Workspace even though the UI Type field on the client script is set to "All".Scenario 2: Client scripts that contain g_user.hasRole API function will not work in the Agent Workspace. For example, the following onLoad client script will not work in Agent Workspace. function onLoad(){ var userID = g_user.getUserID(); var state = g_form.getValue('state'); if (!userID){ g_form.setReadOnly('state', true); }}CauseFor Scenario 1: Ensure "Isolate script" is not set to "false" for the client script, as it will not work in the Agent workspace.For Scenario 2: 'g_user.getUserID()' is not supported in the Agent workspace or service portal but does in the normal SN platform as some APIs are only supported in Desktop UI(platform).ResolutionFor Scenario 1: Set the "Isolate Script" field on the client script to "True" and that should help resolve the issue.For Scenario 2: It is recommended to use 'g_user.userID' as it works in every application.Related Links"Platform front-end scripts and policies will not work on Agent Mobile app." - Catalog client scripts and UI policies are not working in Agent Mobile App