Remove the follow button

marskh111
Giga Contributor

I am trying to remove the follow button from the task table. I have inactivated the UI and it did not remove from the task form. I also have added a condition so it only shows for admins and it still didn't remove from the form. Any suggestions on how to remove this UI ACtion.

22 REPLIES 22

harishdasari
Tera Guru

Harsh Vardhan
Giga Patron

Hi Kimberly,



you can hide the follow button.


create an ui policy on task table.



Please find the script below.



function onCondition() {


      var thePostButton = document.getElementsByClassName('btn btn-default connect-follow');


        for (var i = 0; i < thePostButton.length; i++) {


                  thePostButton[i].style.color = 'transparent';


                  thePostButton[i].style.background = 'transparent';


                  thePostButton[i].style.border = 'none';


                  thePostButton[i].style.visibility = 'hidden';


        }


}



Let me know if you need any further information



Regards,


Harshvardhan




PS - Please mark Helpful, Like, or Correct Answer if applicable.


Thanks! That didn't seem to work properly on our instance though. The follow button is still displaying.


Can you send me the screenshot of your form?



Regards,


Harshvardhan