Discussions

Ask a Question
Back to all

Seconday Assignments during WO creation

We are using WoCreateCommand on the BATCH endpoint to create work orders.

I can assign a primary to that work order in that command. I have not been able to assign SecondaryAssignees at that same time. Is that possible?

Also, I can create the work order, then use the WoAssignCommand on the COMMAND endpoint to set the Secondary Assignees. However, I have not been able to make it work with the BATCH endpoint. Is WoAssignCommand not available through BATCH?

I tried the body shown below with the BATCH endpoint. That call returns "object reference not set."
If I simply take the "CommandName" out of the body in the example below and use the COMMAND endpoint, theit works as expected. So I am assuming the "Command" part of the body below is correct at least.

    {
        "CommandName" : "WoAssignCommand",
        "Command": {
            "WorkOrderId" : "12345",
            "Mode": "AddSecondary",
            "Assignees": [804]
        }
    },