Inserting comments and work notes into sys_journal_field

jmurtha
Kilo Contributor

How can I insert a work note into activity history for a given incident?

The way I am attempting to do it is via direct web service insert, which appears to be working because I get back a response with the sys_id of the new row created in sys_journal_field, but the work note does not show up when displaying the incident. Direct web services have worked so well for me in the past. What am I missing, doing wrong or don't understand?



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sys="http://www.service-now.com/sys_journal_field">
<soapenv:Header/>
<soapenv:Body>
<sys:insert>
<!--Optional:-->
<sys:element>work_notes</sys:element>
<!--Optional:-->
<sys:element_id>abaa265cb881f400aee325aae407baed</sys:element_id>
<!--Optional:-->
<sys:name>task</sys:name>
<!--Optional:-->
<sys:value>And so my fellow Americans...</sys:value>
</sys:insert>
</soapenv:Body>
</soapenv:Envelope>

7 REPLIES 7

When I follow your example using the update function of the incident.do web service, I get the expected response when adding comments and work notes. Comments show up in the incident journal but the work notes don't.

When I call the getRecords function of sys_journal_field.do web service I can see the comments but not the work notes. That makes me think that something is preventing my work note from being saved in the sys_journal_fields table. Any suggestions on how to figure out why your example is working on your instance and not mine?


jmurtha
Kilo Contributor

Learned something new today, and it is only 8:30am. While looking at incident table fields in tables & columns I noticed that column details include the roles required for updating. For incident.work_notes the write roles are itil, and task_editor. I checked the roles of the user I was using when trying to create new work notes and sure enough it did not have either of these roles. I added the itil role and now work notes are being created when updating the incident work_notes table using incident.do web service.


You got it. The nature of work notes is that they are seen by the IT folks, not the customer. Thus, the ITIL role needs to be applied to the user to view/create them.

Good work!