Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Not able to create Work Order task using Rest API

nikhilagarw
Tera Contributor

I have created the Work Order in my PDI using Rest API, while trying to create tasks in my workorder, using below request, I am getting error.  It shows "Parent is mandatory" though I have parent tag in the request.

Request:

{
    "parent": {
        "value": "15b5254d93f20210675e3d5efaba10c0",
         "number": "WO0010015"
    },
    "short_description": "wm task insert test",
    "work_type": "Leak Repair"
}
 
Response:
{
    "error": {
        "message": "Operation Failed",
        "detail": "Data Policy Exception: \n\tThe following fields are mandatory: Parent"
    },
    "status": "failure"
 

 

1 REPLY 1

MihirV
Tera Contributor

Hi, Were you able to resolve this issue ? If yes what was resolution ?