Skip to main content

Posts

Showing posts from May, 2021

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/

Guided tours: how to get the usage stats

 Ref: https://docs.servicenow.com/bundle/paris-platform-user-interface/page/build/help-guided-tours/reference/guided-tour-overview.html

How the 'Activity Stream @Mention Email' notification is triggered

 this will be triggered by tagging the user within a field such as work_notes / comments @david jones live notification via @ which adds it to the live notification table so need to use magnifying glass to select a live notification record when previewing the notification fyi mail script overwrites the notification subject

Incident resolved by change related list - part 2

Building blocks   Ability of relating multiple changes to an Incident ('incident caused by changes'). To minimise on customisation risks we want to avoid creating multiple fields on the Change Request table and use OOB components where possible.  POC using:  • OOB Task Relationship [task_rel_task] table, as one related list rather than two  • Custom UI Action list banner button to initiate the relationship via popup  • UI Page to drive the behaviour in the popup  UI Action  List Banner button: true Client: true  Condition: RP.isRelatedList() && (parent.sys_class_name == 'incident' || parent.sys_class_name == 'problem')  onclick: addRelationship (); condition: RP . isRelatedList () && ( new ChangeTaskRelUtility ()). isValidTable ( parent . sys_class_name ) Script:  function addRelationship () { function addRelationship () { var oModal = new GlideModal ( 'add_chg_to_task' ); oModal . setTitle ( new GwtMessage ().