Pop up or message in Operator Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2023 03:59 PM
Hello, I'm having a problem and would like some help. For the visualization of the alert in the operator workspace, I would like that when the assigned_to is empty, a pop up appears in the operator workspace informing that no remediation can be taken in case the alert is not assumed. Has anyone ever done something like this? I tried on several fronts and was unsuccessful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2023 07:43 PM
Hi @Victor Sarmento ,
I trust you are doing great.
Create a UI Script:
Navigate to "System Definition" -> "UI Scripts" in the ServiceNow application.
Click on "New" to create a new UI Script.
Provide a name for the script, such as "EmptyAssignedToAlert".
In the script field, add the following JavaScript code:
function showAlert() {
var assignedTo = g_form.getValue('assigned_to');
if (!assignedTo) {
alert('No remediation can be taken if the alert is not assumed.');
}
}
Save the UI Script.
Modify the Form:
Identify the form where you want to display the pop-up message.
Open the form in ServiceNow and navigate to the client script section.
Add the following script in the client script section:
function onSubmit() {
showAlert();
return true;
}
- Save the form.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2023 08:35 AM
Olá, como identificar o formulário no espaço de trabalho do operador para a segunda ação?