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.

Check whether additional comment is not empty

Community Alums
Not applicable

Hi Experts,

What could the best method to check if additional comment is not empty in a background and business rule.

@Ankur Bawiskar 

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

Community Alums
Not applicable

Actually i am always using it on current.comments only. Thanks for the above info.

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