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:17 AM
Hi Kristen,
It appears that your UI action is a client one. You may want to make it a server one if you want to leverage the current object and be able to apply it to multiple records in the list view.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 11:19 AM
I'm also wondering why you're creating a UI action for this. Is there a decision that a person needs to do to associate the parent record to the parent_incident field? Would it satisfy your requirement if you have a business rule that updates the parent_incident whenever the parent field changes?
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 11:21 AM
On regards your last question, UI actions are applied on the context of one record. If you want to apply a logic to multiple records (incidents) at the same time then other mechanism sound more appropriate such as a background script or a scheduled job.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 11:22 AM
Hope this helps
Thanks,
Berny