Hide Worknotes updates in Service Portal

bishalsharm
ServiceNow Employee
ServiceNow Employee

Hi Experts,

 

On every update of worknotes in native UI, the same update is reflecting in service portal. The ask is to not show the worknotes updates in portal and keep only the additional comments there. I tried modifying existing ACL and able to hide it also but the problem is it is getting hiden in native UI as well which is not the ask.

 

Also, whatever mails we are sending from servicenow using Email client icon on the top of the incident record, that should remain visible in the portal.

 

so, if you know or came around this scenario before where you had asked to show worknotes in native UI but not in service portal, could you please share any information or solution here.

 

consider Table : Incident

 

Thank you

Bishal Sharma

 

 

9 REPLIES 9

@bishalsharm 

Sure

Would you mind closing your earlier questions by marking appropriate response as correct?

Members have invested their time and efforts in helping you.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sathish Kumar S
Tera Expert

Hi @Sathish Kumar S 

 

both shared articles are not helpful for me..I already checked these.

 

Thanks,

Bishal

bishalsharm
ServiceNow Employee
ServiceNow Employee

@Ankur Bawiskar @Sathish Kumar S 

 

I resolved this by updating the client script section of the widget called "Standard Ticket Tab".

Code appended into the client part.

 

setTimeout(function () {
    // Select all elements that contain "Work notes" text in the activity stream
    var elements = document.querySelectorAll('.text-muted.journal-type.ng-binding');

    for (var i = 0; i < elements.length; i++) {
        // Check if the element contains exactly "Work notes"
        if (elements[i].innerText.trim() === "Work notes") { 
            // Find the closest parent element that represents a single activity entry
            var parentEntry = elements[i].closest('.timeline-item'); 

            if (parentEntry) {
                console.log("Hiding Work Notes:", parentEntry); // Debugging output
                parentEntry.style.display = 'none'; // Hide only work note entries
            }
        }
    }
}, 2000); // Delay to ensure the elements are loaded before running the script

@bishalsharm 

Glad to know.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader