How to hide a button on tab in related list

Anupriya_11
Tera Contributor

Hi ,

I have a requirement  to  customize  a tab 'task' and a button 'edit task' on it. which i tried to create but the button 'edit task' is visible on catalog task also. how can i hide the button on catalog task. I am new  this ,could you please help. 

 

Anupriya_11_2-1698136833967.pngAnupriya_11_3-1698136841714.png

 

4 REPLIES 4

AnveshKumar M
Tera Sage
Tera Sage

Hi @Anupriya_11 

 

In the Edit Task UI Action condition add the following condition. If your condition field already have some conditions add an & character the add the following

 

!RP.isRelatedList() 

 

Please mark my answer helpful and accept as solution if it helped you 👍

Thanks,
Anvesh

Hi @AnveshKumar M ,

 

If i am adding the condition it is getting removed from both  the tabs. 

i have tried with the condition (new GlideRecord(current.getTableName())).canWrite() && RP.isOneToMany() && !RP.getListControl().isOmitEditButton()&&!RP.isRelatedList() .

 

 

Thanks,

Anupriya

Hi @Anupriya_11 

You can check the following link to show it in a particular tab.

 

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

 

Thanks,
Anvesh

AndersBGS
Tera Patron
Tera Patron

Hi @Anupriya_11 ,

 

Right click the header and click "List control":

 

AndersBGS_0-1698137746119.png

 

Afterwards you can omit new and/or edit button which will hide the button:

AndersBGS_1-1698137794167.png

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

 

Best regards

Anders

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/