How to add a work note to an incident via REST Table API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2015 04:40 AM
Hello,
I am trying to add a work_note to an Incident via REST Table API.
UPDATE /api/now/v1/table/incident/<incident_id>
{'comments': 'test1', 'work_notes': 'test2'}
Now my incident has Additional comment with "test1" text, but does not have a Work notes with "test2" text.
However, I can add a work note via web service with JSONv2.
POST /incident.do?JSONv2&sysparm_action=update&sysparm_query=sys_id=<incident_id>
{'comments': 'test1', 'work_notes': 'test2'}
Why is it possible to add a work note via webservice+JSONv2 but not via Table API?
- Labels:
-
Integrations
-
Scoped App Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2015 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2015 05:57 AM
Thank you Mike.
I forgot to mention that my user is not an admin, but has the rest_service role.
I am also able to insert work note with admin user using REST API Explorer, but cannot with the user with the the rest_service role.
At the same time insertion of work note with that user works via web service + JSONv2.
So, I am wondering why it does not work via Table API, but works via web service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2017 11:01 PM
Hi All,
I have developed outbound REST API in Eureka version and its working perfect except for work notes and additional comments. Could anyone please let me know how to move it? Below is line of code :-
var comm= inc.comments.getJournalEntry(-1).toString();
comm=comm.replace(/["']/g, "");
comm=comm.replace(/[\n*]/g, "");
comm= String(comm);
And trying to feed this string to Import set staging table but there its appearing as blank. Any idea where its getting wrong?