Get the name of a related list in a list choice UI Action

torwc
Kilo Contributor

In a condition for a list choice UI Action one can use the RP functionality, for example like this:

RP.isRelatedList() && currrent.problem_id != ""

Is it possible to get the name of the related list I am dealing with, i.e. "incident.problem_id" and put this as a part of my condition?

Tor

1 ACCEPTED SOLUTION

Instead of related list name, can't you try using table name of the parent record ?


View solution in original post

7 REPLIES 7

Tanaji Patil
Tera Guru

Hi Tor,



I am not sure what exactly you are looking for but below shown methods might help you.



sysIdListgetChecked()
Returns a comma-separated list of the sys_ids for the items that are checked in the list.
StringgetListName()
Returns the name of the list, which is usually the table name.
StringgetParentTable()
Returns the name of the parent table (the table associated with the form).
StringgetRelated()
Returns the related list field that associates the related list to the parent form.
StringgetTableName()
Returns the table name for the list.
StringgetTitle()
Returns the list title.

Thanks,


Tanaji


Thanks Tanaji, but this did not help. Unless I did something wrong


Those get functions are used in connection with the GlideList2 (g_list) Javascript class.


As I understand it, g_list is the variable used to access a specified list object. The g_list variable is not available to the related lists form link UI action.


I have defined a UI Action to be used in related lists. It is available in the "Actions on selected" rows menu on the related lists. However my UI action pops up in every related list that is defined, and I want it available only for a few of the related lists. My idea was if I could determine the name of the related list, I could build this into the UI Action's condition.



Regards,


Tor


Kalaiarasan Pus
Giga Sage

If you are trying to hide a button for a particular table's related list (My guess here 'New' button), you can try using create access control and block the access at the table level itself.


Thanks Kalai,


It's not the New button, but a customized UI Action that I want to be available in the "Actions on selected rows" for related lists, but not for every list, only a selection of my Choice



Tor