Hide email client icon for non itil users
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2011 08:47 AM
Hi all ServiceNow guys,
I used the script mentioned on the wiki page to hide the email client icon for non itil user but I detected an undesired impact.
function onLoad() { removeEmailIcon(); function removeEmailIcon() { var yesRole = g_user.hasRoles(); if (!yesRole) { var refs = document.getElementsByTagName("a"); if (refs) { for (var i=0; i < refs.length; i++) { var ref = refs<i>; var inner = ref.innerHTML; if (inner.indexOf("email.gifx") > 0){ ref.style.display = 'none'; } } } } } }
On my task form, i add a custom glide_list field named "Additional contact" equivalent with the "Watch List" field but used only for non itil user. This field have also the same icon named "email.gifx" as the email client.
I you understand the problem ... the script used to hide the email client icon, hide the email icon of the "additional contact" field too.
Do you have an idea to avoid this problem ?
Regards,
Smarti37.
10 REPLIES 10

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2012 09:21 PM
That's prototype javascript syntax to identify the email client icon and hide it.