Incident Comments or work notes added by REST API not visible on Incident screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2018 11:33 PM
Hi Team,
I am using ServiceNow REST API & trying to add comments or work_notes in existing Incident by following REST API. As a result, it's getting success & inserting in DB properly however when I am trying to see the newly added comment or work_notes in respective Incident in Service Now GUI, it's not visible. Can someone help me here to fix this?
REST API End point : https://devxxxxx.service-now.com/api/now/table/sys_journal_field?element_id=44791b8c37121300eb30dcc773990e0b
Request Json:
{
"name": "incident",
"element_id": "44791b8c37121300eb30dcc773990e0b",
"value": "Internal Note 4 by REST API",
"element": "work_notes"
}
API Status : 201 Created
Refer following ServiceNow Incident screen as well.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2019 02:40 AM
What David mentioned above is absolutely correct. The activity formatter queries the records from sys_history_line, sys_history_set tables. Also it is not advisable for us to insert the data directly. Tomorrow if any new table is added by SN in the future to normalize the records, the API setJournalEntry will automatically takes care of it. But if we are inserting it manually, then we need to update our code.
Hence use the available API wherever possible.
Mark the comment as a correct answer and helpful if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2020 12:53 PM
Can you specify the user along with the work_notes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2020 06:22 AM
If you use setJournalEntry() you can specify the user as a second argument in the function call. eg:
current.work_notes.setJournalEntry('add worknotes here', 'add user_name here');