- 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
‎09-12-2023 06:20 AM
Can you guide me with this script?
Where should I put it, how should I fill it etc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2024 05:19 AM
In case you (or anyone else) is still stuck on this, this code worked for me in my scoped app:
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;
}
isListLabel(RP, "Name of my List");