Not Working/Updating value of comments_and_work_notes in incident table

pavan yadav1
Tera Contributor
Not Showing value of comments_and_work_notes on service UI of incident table when new incident create via REST API after successfully incident record created. And also  I am getting empty value of comments_and_work_notes key in response body.
 
url : https://{instance}.service-now.com/api/now/table/incident
Request body :
{
    "short_description" : "created by pavan20",
    "caller_id" : " ",
    "comments_and_work_notes": "Testing comments_and_work_notes when new incident record created in incident       table"
 }
 
Response body : 
{
    "result": {
        "parent": "",
        "caused_by": "",
        "watch_list": "",
        "upon_reject": "cancel",
        "sys_updated_on": "2024-02-29 04:35:00",
        "origin_table": "",
        "approval_history": "",
        "number": "INC0010064",
        "x_1318253_demo_pavan_field_name1": "",
        "x_1318253_demo_pavan_field_name2": "",
        "state": "1",
        "sys_created_by": "Admin",
        "knowledge": "false",
        "order": "",
        "cmdb_ci": "",
        "delivery_plan": "",
        "contract": "",
        "impact": "3",
        "active": "true",
        "work_notes_list": "",
        "priority": "5",
        "sys_domain_path": "/",
        "business_duration": "",
        "group_list": "",
        "x_1318253_demo_pavan_field_name": "",
        "approval_set": "",
        "universal_request": "",
        "short_description": "created by pavan20",
        "correlation_display": "",
        "delivery_task": "",
        "work_start": "",
        "additional_assignee_list": "",
        "notify": "1",
        "service_offering": "",
        "sys_class_name": "incident",
        "closed_by": "",
        "follow_up": "",
        "parent_incident": "",
        "reopened_by": "",
        "reassignment_count": "0",
        "assigned_to": "",
        "sla_due": "",
        "comments_and_work_notes": "",
        "escalation": "0",
        "upon_approval": "proceed",
        "correlation_id": "",
        "made_sla": "true",
        "child_incidents": "0",
        "hold_reason": "",
        "task_effective_number": "INC0010064",
        "resolved_by": "",
        "sys_updated_by": "Admin",
        "opened_by": {
            "link": "https://{instance}.service-now.com/api/now/table/sys_user/6816f79cc0a8016401c5a33be04bdfdff",
            "value": "6816f79cc0a8016401c5a33be04bsffc"
        },
        "user_input": "",
        "sys_created_on": "2024-02-29 04:35:00",
        "sys_domain": {
            "link": "https://{instance}service-now.com/api/now/table/sys_user_group/global",
            "value": "global"
        },
        "x_1318253_demo_custom_field_name": "",
        "route_reason": "",
        "calendar_stc": "",
        "x_1318253_demo_just_test": "",
        "closed_at": "",
        "business_service": "",
        "business_impact": "",
        "rfc": "",
        "time_worked": "",
        "expected_start": "",
        "opened_at": "2024-02-29 04:35:00",
        "work_end": "",
        "caller_id": {
            "link": "https://{instance}.service-now.com/api/now/table/sys_user/ ",
            "value": " "
        },
        "reopened_time": "",
        "resolved_at": "",
        "subcategory": "",
        "work_notes": "",
        "close_code": "",
        "assignment_group": "",
        "business_stc": "",
        "cause": "",
        "description": "",
        "origin_id": "",
        "calendar_duration": "",
        "close_notes": "",
        "sys_id": "9851d097972002103f61b390f053gfdfs",
        "contact_type": "",
        "incident_state": "1",
        "urgency": "3",
        "problem_id": "",
        "company": "",
        "activity_due": "",
        "severity": "3",
        "comments": "",
        "approval": "not requested",
        "due_date": "",
        "sys_mod_count": "0",
        "reopen_count": "0",
        "sys_tags": "",
        "location": "",
        "category": "inquiry"
    }
}
 
2 REPLIES 2

shyamkumar VK
Kilo Patron

Hello @pavan yadav1 ,

 

can you try Adding Work notes into the JSON and try 

{"work_notes":"testing"}

Reference

 

shyamkumarVK_1-1709184410015.png

 

 

 

Regards,

Shyamkumar

 

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Harshad Wagh
Tera Guru

this comments_and_work_notes field is not visible on form,

 

you need to pass this information in either "work_notes" or "comments" field which will be appended on above field as well.

 

Thanks

Harshad