We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Hide Ui action on one related list created by relationship but show on related list on same table

sri vyshnavi
Tera Expert

I have a multiple related list on same table but need to show ui actions only on particular related list and hide on others

1 ACCEPTED SOLUTION

Not applicable

We can achieve this through RP and condition evaluation on script include. Please find below steps 

find_real_file (2).png

find_real_file (3).png

find_real_file (1).png

find_real_file.png

View solution in original post

5 REPLIES 5

Not applicable

We can achieve this through RP and condition evaluation on script include. Please find below steps 

 

find_real_file (2).png

find_real_file (3).png

find_real_file (1).png

find_real_file.png

Not applicable

We can achieve this through RP and condition evaluation on script include. Please find below steps 

find_real_file (2).png

find_real_file (3).png

find_real_file (1).png

find_real_file.png

Not applicable

Use below condition and script in UI Action:


Condition: RP.isRelatedList()&&new check().validate(RP.geListControl().getControlID())

Script: 

var check  class.create();
check.prototype = {
initialize: function() {
},
validate:function(a){
 
var listcontrol = new GlideRecord('sys_ui_list_control');
if(listcontrol.get(a)){
return listcontrol.related_list == "incident.parent_incident";
}
return false;
},
type: 'check'
};

 

PrashantRathore
Tera Contributor

Hi,

you can check below community post which is similar to your requirement:

https://www.servicenow.com/community/developer-forum/how-to-get-sys-id-or-name-of-a-related-list-in-...

 

Thanks,

Prashant