Helptext manipulation - with or without DOM manipulation (classic UI)

Remove helptext from a field without DOM manipulation:

var worknotes = g_form.getLabel('work_notes_list');

worknotes.removeChild(worknotes.lastElementChild);

another option
function removeHintFromLabel(fieldName) { var oField = g_form.getLabel(fieldName); var fieldChildren = oField.childNodes; for (var c = 0; c < fieldChildren.length; c++) { var className = fieldChildren[c].className; if (className.indexOf('icon-help') != -1) { oField.removeChild(fieldChildren[c]); } } } removeHintFromLabel('work_notes_list');







with DOM - note: old article, not necessarily the best to use DOM
https://servicenowguru.com/scripting/client-scripts-scripting/showhide-service-catalog-variable-help-text/

Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

Running transform maps asynchronously