water mark or prepopulated text inworknotes

nameisnani
Mega Sage

Hi Team 

 

when ever we are reopening the incident 

 

can any one please help me on this requriement 

 

Enable Mandatory capture of reason in Work Notes when an incident is reopened.

 

request is to ensure that whenever an incident is moved from Resolved to In Progress that is reopened by the caller or operate team, the system automatically should prompt the user or operate team to enter the reason for reopening, which should populate in the Work Notes field.

 

The incident should not be allowed to transition from Resolved to In Progress unless the reopening reason is mandatorily filled.

 

we need a water mark or pre populated text in the work notes 

 

how to achieve this requirment 

nameisnani_0-1778657527966.png

 

 

Ehab Pilloor

 

@Ehab Pilloor 

@Ankur Bawiskar 

 

please help me here

7 REPLIES 7

@nameisnani 

 

It maybe possible via DOM manipulation but it shall be avoided as much as possible.

 

Alternate solution i can suggest is to add the message to work notes via UI action by System.

 

Regards,

Ehab Pilloor

Ankur Bawiskar
Tera Patron

@nameisnani 

you can show info message or field message from that UI action script

why to show that placeholder text all the times?

It is required only while reopening right?

If you still want then you can use this in client script when state changes from Resolved to In Progress

var streamNotes = g_form.getControl("activity-stream-work_notes-textarea");

streamNotes.placeholder = 'Please provide reason for opening this incident.';

Output

55.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Ehab Pilloor
Mega Sage

Ankur has provided the code. @nameisnani you can add it as shown is ss below: 

EhabPilloor_1-1778661716272.png

This works fine for your usecase. the placeholder only shows when prompted for adding worknotes during reopen.

 

Regards,

Ehab Pilloor