C

Jason116
Tera Contributor

,

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Jason116 

that's the OOB behavior.

Why the work notes are mandatory? from where client script or ui policy

Ensure you give correct conditions so that when UI action is visible work notes are not mandatory

is that UI action client side? please share screenshot of the configuration

Code looks fine to me.

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

.

 

 

@Jason116 

that's OOB behavior.

if you click UI action and if some field is mandatory then system throws that message.

Why not check inside the UI action if comments is populated or not?

If not then throw some custom message.

If yes then run your next code

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

Vishwa Pandya19
Mega Sage

Hey Jason,

 

To Copy over all work notes and comments, did you try getJournalEntry() function?

getJournalEntry(1) gets the latest entry.
getJournalEntry(-1) gets all entries.

 

If my answer helps you in any way please mark it as correct or helpful.