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.

In the 'Resolution Information' tab, Resolution notes field to display a watermark in the Incident

nameisnani
Mega Sage

Hi Team ,

 

We have a requirement that when ever we are going to resolve the incident . In the Resolution Notes ' Below steps were followed to resolve the incident- ' This text has to be display has a watermark .

 

can any one please provide onsubmit script for this ,  

 

nameisnani_0-1728446990824.png

 

8 REPLIES 8

Ashish Parab
Mega Sage
Mega Sage
Hey @nameisnani ,
 
function onSubmit() {
    var state = g_form.getValue('state');
   
    if (state == '6') {
        var resolutionNotes = g_form.getValue('close_notes');
       
        // Add the watermark if it's not already present
        if (resolutionNotes.indexOf("Below steps were followed to resolve the incident-") === -1) {
            g_form.setValue('close_notes', "Below steps were followed to resolve the incident- \n" + resolutionNotes);
        }
    }
    return true; // Allow form submission
}
 
ashish_parab_0-1728451111624.png

 

 

Please mark this as "correct" and "helpful" if you feel this answer helped you in anyway.

 

Thanks and Regards,

Ashish

@Ashish Parab  Let me try 

@nameisnaniLet me know if it doesn't work. Please check the attached screenshot.

Hi @Ashish Parab 

 

I have followed your script.

nameisnani_0-1728451088763.png

 

See in the resolution notes water mark is not coming . @Ashish Parab  Pleasse help me here

nameisnani_1-1728451258958.png