- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 12:55 PM
Hello! We are trying to hide/show a custom UI Action based on a related list ID. We only want to show that UI Action on a very specific related list.
For example: IF Related List ID is REL:7f22341ca1ba20107f612a6c7e377117
Is there anyway to do this? Thanks!
Solved! Go to Solution.
- Labels:
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 03:45 PM
Looks like this does not work in scoped apps. To workaround this we made our own function. Below is our script include.
function isListLabel(RP, label) {
var sysId = RP.getListControl().getControlID();
var gr = new GlideRecord('sys_ui_list_control');
gr.get(sysId);
var grLabel = gr.getValue('label');
if (grLabel == label) {
return true;
}
return false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 01:08 PM
You can base it on the name by using:
RP.isRelatedList() && RP.getListControl().label.equals('name of list')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 03:39 PM
Thanks! This actually does not work in a scoped app. We ended up building our own function to something similar but it returns ID for the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2025 03:00 PM - edited ‎04-01-2025 03:00 PM
It appears to be working in scoped apps now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2021 03:45 PM
Looks like this does not work in scoped apps. To workaround this we made our own function. Below is our script include.
function isListLabel(RP, label) {
var sysId = RP.getListControl().getControlID();
var gr = new GlideRecord('sys_ui_list_control');
gr.get(sysId);
var grLabel = gr.getValue('label');
if (grLabel == label) {
return true;
}
return false;
}