Displaying UI Action only on related list

Kamal17
Kilo Sage

Hi,

I'm trying to create a client side UI action (List banner button) on a related list. The button is visible on the related list, but the issue is that the button appears in the default list view of the table also.

I tried to restrict the UI Action visibility by using the condition "g_form.getTitle() == relatedListName" in the condition field. However, the UI Action is displayed even when the condition evaluates to false. Though i have made the UI Action as client side, I see "g_form.getTitle()" is not working in the condition field.

It would be much helpful if someone can suggest me a way to restrict the UI Action to be visible only on related list.

Thanks,

Udhay

7 REPLIES 7

Kamal17
Kilo Sage

Hi,



I tried using RP.isRelatedList() function in the condition field and it solved my issue. Now my UI action button is visible only on related list.


Thank you Tanaji and Pradeep



Regards,


Udhay


For future reference and clarification, for a UI action that was only intended for, in my case, the versions of scripts when already looking at a versionable record, this did not work:

RP.isOneToMany() || RP.isManyToMany()

This did:

RP.isRelatedList()

Ashish Kumar Ag
Kilo Guru

Tanaji's solution will work perfect. To be more specific you can use



For Many-to-Many related list use   RP.isManyToMany()   in condition.


For One-to-Many use RP.isOneToMany() in condition.