Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Alternative to DOM

aswinsiddaling2
Kilo Guru

Hi All,

Currently I have a functionality where the number of attachments are suffixed next to the Paper Clip icon in any task record. This is done using a DOM manipulation in a onLoad client script as shown below.

var iconElement = document.getElementById('header_add_attachment');

iconElement.innerHTML = g_scratchpad.num;         //This scratch pad value comes from an on display business rule

And this is how the icon looks

Screen Shot 2017-02-02 at 5.20.48 PM.png

Is there any way to achieve this functionality apart from DOM? Please let me know

5 REPLIES 5

I have already achieved the requirement. I was checking for alternatives and haven't got any yet.