logo

NJP

Work notes , Additional Comments behavior with Activity Or Always show work notes & Additional comments (Customer visible) Or How multiple journal fields behave

Import · May 02, 2018 · article

Problem Statement

  1. How multiple journal fields behave on records like ( Task, Request, Requested Item etc.)
  2. How to separate work notes & Additional comments (Customer visible) & make visible both at the same time
  3. Hide Post button under work-notes or customer facing notes

Solution

  • Out-of-the-box behavior of multiple journal fields in service-now if put-together with activity in same tab-form; will get clubbed together & you will see options like Post button or show all journal fields.
  • You will see like below, where Notes is separate tab on form, in form-design I had put together work-notes & customer-facing & Activities all together in Notes tab. image
  • Now in this, I have taken out work-notes & Additional comments from Notes tab-form & put in default. i.e. Now additional comments, work notes are in same tab-form & activities in different tab-form. Now post button is not visible & both fields [work-notes, additional comments ]are visible at the same time.image
  • Now if we put one journal field (work-notes) or (additional comments) with activities in Notes tab form, Both fields will be visible & for journal field which is with activity will show Post buttonimage

image

function onLoad() {
    //Type appropriate comment here, and begin script below
    var thePostButton = document.getElementsByClassName('btn btn-default pull-right activity-submit');

    for (var i = 0; i < thePostButton.length; i++) {
        thePostButton[i].style.color = 'transparent';
        thePostButton[i].style.background = 'transparent';
        thePostButton[i].style.border = 'none';
        thePostButton[i].style.visibility = 'hidden';


    }
}

Labels:

image

View original source

https://www.servicenow.com/community/now-platform-articles/work-notes-additional-comments-behavior-with-activity-or-always/ta-p/2327824