Skip to main content
Question

Time related error in work order API

  • October 21, 2022
  • 1 reply
  • 60 views

Hi All,

My observation

     Please understand below one of the scenario is causing error. 

 

Actual Staring time : 7:30 PM (UTC Time is 11:30 PM) 

Actual Ending time:  8:00 PM (UTC Time is 12:00 AM) 

 

In that scenario causing issue 

"WorkOrder.Labor[0].ActualEndTime: The times are invalid. The end time cannot be earlier than the start time.\nWorkOrder.Labor[0].ActualStartTime: The start time cannot be later than the end time. Correct the values.\nWorkOrder.Labor[0].StartDate: The start time cannot be later than the end time. Correct the values."

 

Even though we pass time along with the date , these Actual start time and end time not considering Date in the request format

 

We tried below accepted format already

 

Local time format with time zone

Actual Start Time : 2022-10-21T19:30:00-04:00

Actual End Time : 2022-10-21T18:00:00-04:00

 

 

UTC Format

Actual Start Time : 2022-10-21T23:30:00

Actual End Time : 2022-10-22T00:00:00

 

Both format system not getting accept and throwing the error.

 

 

Below is the sample request format.

 

{

  "OrderNbr": {

    "value""W-223165"

  },

  "Type": {

    "value""CT"

  },

  "note""",

  "OffLineSentDateTime": {

    "value""2022-10-21T20:00:00-04:00"

  },

  "OffLineSentStatus": {

    "value""1"

  },

  "Labor": [

    {

      "note""",

     "EmployeeID": {

        "value""1007"

      },

      "ActualStartTime": {

        "value""2022-10-21T19:30:00-04:00"

      },

      "ActualEndTime": {

        "value""2022-10-21T20:00:00-04:00"

      },

      "InventoryID": {

        "value""FLAGSVC"

      },

      "Project": {

        "value""20-00042"

      },

      "Latitude": {

        "value"""

      },

      "Longitude": {

        "value"""

      },

      "PostalCode": {

        "value"""

      },

      "LineDescription": {

        "value""TESTJJKHKJ"

      },

      "Comment": {

        "value""878978978989"

      },

      "ExternalRefNbr": {

        "value""878888"

      },

      "StartDate": {

        "value""2022-10-21T19:30:00-04:00"

      },

      "LaborItem": {

        "value""CC5"

      },

      "ProjectTask": {

        "value""DAY"

      }

    }

  ],

  "custom": {},

  "files": [],

  "Completed": {

    "value"true

  }

}

 

Question here is why it’s this fields are validating like this? Is that anyway to skip this validation? Please help

1 reply

Troy Vars
Semi-Pro I
Forum|alt.badge.img+2
  • Semi-Pro I
  • December 2, 2022

What endpoint entity are you using? Is this custom as neither Appointment, Service Order nor Manufacturing (Labor Entry, Production Order etc) seems to have Labor as a detail item for their entities.