- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 11:29 PM
when i try to use this patch command to update inc ticket :
{"work_notes": "[code]<a title='Warranty coverage details for SCI and DeSc computers' href='kb_view.do?sys_kb_id=e31486b5474321009db4b5b08b9a7164' >KB0000010 : Warranty coverage details for SCI and DeSC computers</a>[/code]"}
the tab for attached knowledge article does not come out :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 07:13 PM
Hi @chercm
You can try the Table API. Let's put the table name as "m2m_kb_task" and the body with the task and knowledge sys_id, it should work.
Sample below.
POST https://<instance_name>/api/now/table/m2m_kb_task
Body
{
"task": "<task_sys_id>",
"kb_knowledge": "<knowledge_article_sys_id>"
}
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 07:39 PM
Hi @chercm
Yes the task_sys_id above is the record sys_id. There's a couple of ways that you can retrieve the record sys_id.
If you're using scripting with GlideRecord query, you can dotwalk sys_id or use the API getUniqueValue().
Also, in the Request Body at the task attribute, you can enter the Incident Number. It should work as well.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 07:16 PM
@Timi can i check how can i get the task information ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2023 04:36 PM - edited 12-18-2023 05:02 PM
@Tai Vu can i check how to get the task id ?
i do not see any mentioned of any incident sysid number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2023 07:39 PM
Hi @chercm
Yes the task_sys_id above is the record sys_id. There's a couple of ways that you can retrieve the record sys_id.
If you're using scripting with GlideRecord query, you can dotwalk sys_id or use the API getUniqueValue().
Also, in the Request Body at the task attribute, you can enter the Incident Number. It should work as well.
Cheers,
Tai Vu