Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to add Latest comments in virtual agent

SS1510
Tera Expert

I have a requirement to add Latest comments on incident on Virtual Agent Card,  I have to show short description, state and latest comments. When i am adding the comments field on card latest 3 comments are showing , i want to show only 1 latest comment, how can i achieve this?

SS1510_0-1762161250852.png

 

1 REPLY 1

GlideFather
Tera Patron

Hi @SS1510,

 

you can use the query to that particular incident, check their comments, sort it by created on and use setLimit( 1 ), that will give you the latest comment.

 

Can you share some more of your configurations? The branches you have there seem to select INC, RITM and some Case (HR or CSM?), but how do you do to select a desired record in each of the branches?

_____
Answers generated by GlideFather. Check for accuracy.