How to add a popup message on a list view

Alessia Russo
Tera Expert

Hi everybody! I would show a popup with an alert message if a user is tring to make an action from a list view with the box of 'actions on selected row'. So after it shows this pop up the user can't continue those action.

 

For ex:

The user selects 3 records, in one of this records there's a field with a certain choice than he souldn't be able to go on. So after he selects, from the 'action on selected row' below on the list, a specific action, this popup shows saying like "This X is not a control, you can't create/do this action" and doesn't let make the action.

 

How could I do it? With a script include? Is there a glide that I can use for it?

Someone can show me a draft of how the script should look?

Hope you can help me,

Thanks

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

@Alessia Russo 

on which UI action you want this?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar I want that the popup appear and stop the action after selected one of the choice below the list as you can see in the image.

So I should selected some records, click one of the choice and if not respect some conditions it should show the popup alert

@Alessia Russo 

the code for Action on selected rows is not accessible to admins/developers.

So you cannot customize it.

Anyhow for list choice UI action the script will only run for the records which satisfy the UI action condition

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar ok, but I don't want to change the action on selected rows,  I would use it like the trigger for the popup if users selected the wrong records.

In any case I could I make a popup message appear on a record lists? There's some script I could use for that? I have to create them as script includes?

Thanks