How to show List Banner Button UI Action only in specific related lists?

bala_sn
Kilo Expert

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

14 REPLIES 14

I tried this but it didnt work. Is there any work around for this. We are Jakarta.


Did you able to figure the solution for the UI Action.


oleksiykosenkov
Giga Contributor

Property RP.getListControl().relatedList contains sys_id of your related list and is still public. You can distinguish your lists by this value.


The system gives me an error of "Illegal access to getter method getRelatedList in class com.glide.ui.SysListControl" when I try to use RP.getListControl().relatedList in the condition field.  Any other suggests.  I've got a use case on the change form where there is two different related lists back to the incident table.  I only want my custom button to show up on one of the lists.

I'm working on a Kingston instance

I figured out a solution by using  RP.getListControl().getControlID() == '9857db200a0006415b334edd0d5029e4'