How to show List Banner Button UI Action only in specific related lists?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2016 01:07 AM
Hi,
I've created a custom List Banner Button UI Action. This is on a m2m table.
This m2m table is added as a related list on many tables (through relationships). And also displayed in 5 related lists on a same table (again through relationships).
I don't want the list banner ui action to be shown in all the related lists, rather I would want that to be shown only in one of them.
I try this code, but it doesn't work. Is there any other way by which I can achieve this?
Code which I use in the condition field: gs.action.getGlideURI().get('sysparm_collection_label')=='specific tab name where I want to display the ui action'
Regards,
Bala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2016 07:45 AM
I would try to use a list edit tag. You should be able to access the list edit tag as part of the UI Action condition to be displayed.
Try using the function RP.getListControl(), the object returned should also contain the list edit tag.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2016 08:07 AM
Thanks for the hint, Fogg.
Do you know how I can get the list edit tag after I get the object using the function RP.getListControl()?
Thanks in advance for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2016 02:00 AM
not on the top of my head. sorry. would need to start testing/debugging.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-11-2017 12:21 PM
Here is a link to the proper solution:
Related list and list edit tag for an UI action condition...
However, seems not to be working anymore. Might be worth to raise a HI incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2017 01:50 PM
Here is my solution based on this discussion. Thanks for the initial legwork by the way:
I set the List Control > List Edit Tag to a string I could look up (in this case 'true'). I then added this criteria to the Condition on the UI Action: RP.getListControl().listEditRefQualTag== 'true'. The Button now only appears on a Related list where the List edit tag is set to 'true'.
This would be a problem if we were using the tag for a reference qualifier, but we are not. And even then, I bet we could share the tag.