How I can hide the suggestion icon in short description field

Saif Al-Bashiti
Mega Expert

Hello Expert 🙂

Please I need your help to hide the suggestion icon in short description field ?

short description field exist in task table , and my table extend the task table so I dont want to make any effect in the base table < Task > 

screenshot : 

find_real_file.png

7 REPLIES 7

Saif Al-Bashiti
Mega Expert

Thanks for your response 

but nothing work 😞

Hello Saif,

https://community.servicenow.com/community?id=community_question&sys_id=b37200d6db80a3408e7c2926ca96...

OR:

Make ISLOATED SCRIPT CHECKBOX : False 

function onLoad() {



//pick list icon does not have an id
//get all of the A tag elements in the document
var refs = document.getElementsByTagName("a");
if (refs) {
for (var i=0; i < refs.length; i++) {
var ref = refs<i>;
var inner = ref.innerHTML;
//check for the name of the icon image
if (inner.indexOf("pick_list.gifx") > 0){
ref.style.display = 'none';
}
}
}
}

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

Thank you,
Abhishek Gardade

neilpetertuffs
Tera Contributor

Don't know if you ever solved this, I used a UI Formatter / UI Macro solution - since you cannot / should not use DOM manipulation in client scripts this UI Macro overcomes this (just add the formatter to the form) and this targets JUST the short_description...

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g2:evaluate>
var target = "lookup." + current.getTableName() + ".short_description";
</g2:evaluate>
<div id="${ref}" /><!-- this is required to hide the formatter otherwise there is a blank space -->
<script>
document.getElementById("${ref}").parentElement.style.display="none";
var element = document.getElementById("$[target]");
if (element !== null) element.style.display="none";
</script>
</j:jelly>