Check whether additional comment is not empty
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2022 10:25 PM
Hi Experts,
What could the best method to check if additional comment is not empty in a background and business rule.
var gr = new GlideRecord('incident');
gr.get('b64f102567f551101a1136dbd36d434d');
gs.print(gr.number);
gs.print(JSUtil.nil(gr.comments));
//gs.nil()
based upon which i wish to call an api. Please help.
Thanks in advance.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2022 12:19 AM
Actually i am always using it on current.comments only. Thanks for the above info.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2022 12:23 AM
Hi,
then why not use business rule which is after update
In condition check Comments [IS NOT EMPTY]
Script: your logic
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader