UI Action on List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 11:08 AM
I have a UI Action set up as a list choice with a condition current.parent==''.
First issue:
When I see the UI action in the list choice, I can see that it doesn't apply to all of the records, but if I choose to continue, it will run against that selected record. I've tried adding an if statement in the script to prevent it running on selections where the condition doesn't match, but it now is failing for all attempts to use the UI Action and shows my error message instead. This is the UI Action setup:
Secondary issue:
The error message is showing up for as many of the records I selected and I really only need a single error message. How do I change the script to do this?
Thanks!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 11:27 AM
Hi Berny,
We have disabled edit in list on most of our lists to prevent users from editing fields and not adding information that might be required. However, I have a need to allow certain users the ability to add the parent to the incident. I have the update of parent_incident just to keep them in sync. I used this guru post to set this up.
https://www.servicenowguru.com/system-ui/glidedialogwindow-quickforms/
The entire purpose is: User selects incidents, clicks ui action (only when it applies to all of the selected items), populates the parent field on the simple form that pops up, and my script sets the parent_incident and updates the record. This is working for the most part except for making sure that they only run it for incidents that do not yet have a parent. If I take out the if statement in the script, it runs without issue against the records. The issue is that I need to stop them if an incident already has a parent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2017 05:51 AM
Us your list 'List V3' compatible?
In List v2 for a List context menu/List choice, any condition that contains the global variable 'current' does not work.
You can find more info here: https://hi.service-now.com/kb_view.do?sysparm_article=KB0596799
Regards,
Santhosh