How to remove Add Me icon on reference user field ?

nthumma
Giga Guru

any thoughts?

7 REPLIES 7

Ashish Kumar Ag
Kilo Guru

You have two option..



Write a Onload Client script if specific to a table.


For multiple table write a Global UI Script. Below is the code which will hide the add me icon.



gel('add_me_locked.Table Name.Field Element Name').style.display = 'none';


gel('add_me.Table Name.Field Element Name').style.display = 'none';


tltoulson
Kilo Sage

Hi srnewbie,



This can be done using an onLoad client script.   You have to hide both the "locked" and "unlocked" version of the icon.   The script looks like this:



function onLoad() {


      $('add_me_locked.incident.work_notes_list').hide();


      $('add_me.incident.work_notes_list').hide();


}



Change incident.work_notes_list depending on the table and field name like so <table>.<field>_list



I hope this helps.



Kind regards,



Travis


manipulating DOM objects is restricted in scoped applications in fuji , any other solutions ?


Travis Toulson Mike Allen Ashish Agarwal


Ok, we'll try a more "proper" approach.   You can embed styles in the page using a Macro + Formatter.   Here are the steps:



1.   Create a UI Macro (replace the table name and field name as appropriate):


<?xml version="1.0" encoding="utf-8" ?>


<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">


      <style>


                  #add_me_locked.incident.work_notes_list { display: none !important; }


                  #add_me.incident.work_notes_list { display: none !important; }                


      </style>


</j:jelly>


2.   Create a Formatter that uses the Macro you created


3.   Add the Formatter to your Form



The CSS you have injected should now hide the button as desired since the !important declaration overrides other styles.