How to get work notes for Problem table using REST API

EvgeniyG
Tera Contributor

I try to get work notes for Problem table via REST API, but the field:

comments_and_work_notes is empty.
Vancouver
 
Thank,
Evgeniy
1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

Hi, journal entries (like work_notes) are recorded in the sys_journal_field table.
/now/nav/ui/classic/params/target/sys_journal_field_list.do%3Fsysparm_clear_stack%3Dtrue
You can use the table API to query, just like any other table, but will need to filter on name, element and element id example from a PDI
name=incident^element=work_notes^element_id=1c741bd70b2322007518478d83673af3

 

View solution in original post

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, journal entries (like work_notes) are recorded in the sys_journal_field table.
/now/nav/ui/classic/params/target/sys_journal_field_list.do%3Fsysparm_clear_stack%3Dtrue
You can use the table API to query, just like any other table, but will need to filter on name, element and element id example from a PDI
name=incident^element=work_notes^element_id=1c741bd70b2322007518478d83673af3

 

Amit Verma
Kilo Patron
Kilo Patron

Hi @EvgeniyG 

 

I tried posting some comments from the REST API explorer using PUT method for an exisiting problem using Table API on Problem table and it is working as expected. Please refer below screenshots and try accordingly. Note that comments and worknotes and worknotes are two different fields.

 

AmitVerma_0-1706608933311.png

 

AmitVerma_3-1706609032504.png

 

 

AmitVerma_2-1706609008546.png

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

EvgeniyG
Tera Contributor

Thank you for your help and answers? 
Is it possible to create some sort of business rule, to add comment to the parent table record? So, for example work_notes field in incident record would contain actual comments/work notes?
Regards,

Evgeniy