How to get specific journal entry (Additional Comments & Work Notes)?

Jehiellb
Giga Contributor

Hi Team,

Is there a way to capture a specific Additional Comments & Work Notes? I'm doing an integration where I'm sending an incident ticket to another platform using REST API: POST and PUT method and a Business Rule. But there is a case that if I update the ticket all the comments is being posted even tho I already receive it from the previous update.

I'm somehow familiar with journal entry but not fully knowledgeable to use it, I know that

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

I have tried using the both of them, but what I need to get is the journal entry in between.

For example: 

I created an Incident and assigned it to Group 1 then posted a comments and work notes. This update will be posted to another platform that I'm using. 
Additional Comments 1-3
Work notes 1-3

Then, I reassigned the incident to another group - (Group 2) then posted another comments and work notes. This update should not be captured  b/c I have a business rule condition that it will only update the ticket from the other platform WHEN the Assignment group is assigned to Group 1.
Additional Comments 4-6
Work notes 4-6

Lastly, I reassigned it back to Group 1 and check the updates from the other platform. It did capture the
Additional Comments 4-6
Work notes 4-6 
BUT also the 
Additional Comments 1-3
Work notes 1-3

 

What I want to capture is only the 
Additional Comments 4-6
Work notes 4-6
not the 1-3, b/c it was already posted from the previous update.

 

Would that be possible? Let me know if you need any clarification to help you answer my question. I will provide information if necessary.

 

Your help on this will be much appreciated, Thanks in advance!  

 

5 REPLIES 5

MahamKali Badug
Tera Contributor

Yes, You can achieve specific work notes or comments from a record.
In ServiceNow we have a table Journal Entries (sys_journal_field) here we can find all comments and work notes 

 

MahamKaliBadug_0-1681615406053.png

 

If you want specific note (based on user) you can created by (sys_created_by) field in your script.
Try this.