TLDR; How can I avoid time zone issues with Plan dates on Production Order Details when they are created via API? Due to the long JSON blocks, this question split over the first few comments as well.
Configuration:
- My Site Preferences ‘Login Time Zone’ is blank
- My logged in UI user is also set to a blank Time Zone
- My API user’s Time Zone is blank
- I am using infinite scheduling with a Finish On Constraint
- The Work Calendar is M-F 11 hour days in UTC-08:00
Request:
I log in via Postman to the API user for my local Acumatica instance. Then I PUT a Production Order (entity/MANUFACTURING/23.200.001/ProductionOrder?$filter=ProductionNbr eq 'DATETEST'):
{
"OrderType": {
"value": "RG"
},
"ProductionNbr": {
"value": "DATETEST"
},
"InventoryID": {
"value": "018954"
},
"OrderDescription": {
"value": "test product"
},
"Warehouse": {
"value": "PBNW"
},
"Location": {
"value": "*MFG"
},
"OrderDate": {
"value": "2025-01-03T00:00:00-08:00"
},
"QtytoProduce": {
"value": 31
},
"UOM": {
"value": "EA"
},
"SchedulingMethod": {
"value": "Finish On"
},
"Constraint": {
"value": "2025-01-31T00:00:00-08:00"
},
"DispatchPriority": {
"value": 6
},
"AllowPreassigningLotSerialNumbers": {
"value": true
},
"RequireParentLotSerialNumber": {
"value": "On Issue"
},
"Source": {
"value": "No Source"
}
}
The response is:
{
"id": "58191ab0-1aca-ef11-912a-00d86198c979",
"rowNumber": 1,
"note": {
"value": ""
},
"AllowPreassigningLotSerialNumbers": {
"value": true
},
"BOMID": {},
"BOMRevision": {},
"Branch": {
"value": "100"
},
"ConfigKey": {},
"ConfigurationID": {},
"ConfRevision": {},
"Constraint": {
"value": "2025-01-31T00:00:00-08:00"
},
"CostingMethod": {
"value": "Actual"
},
"Customer": {},
"DispatchPriority": {
"value": 6
},
"EndDate": {
"value": "2025-01-31T00:00:00-08:00"
},
"EstimateRevision": {},
"ExcludefromMRP": {
"value": false
},
"Hold": {
"value": false
},
"InventoryID": {
"value": "018954"
},
"Location": {
"value": "*MFG"
},
"OrderDate": {
"value": "2025-01-03T00:00:00-08:00"
},
"OrderDescription": {
"value": "test product"
},
"OrderType": {
"value": "RG"
},
"ParentOrder": {},
"ParentOrderType": {},
"ProductionNbr": {
"value": "DATETEST"
},
"ProductManager": {},
"ProductOrder": {},
"ProductOrderType": {},
"ProductWorkgroup": {},
"QtyComplete": {
"value": 0.0
},
"QtyRemaining": {
"value": 31.0
},
"QtyScrapped": {
"value": 0.0
},
"QtytoProduce": {
"value": 31.0
},
"RequireParentLotSerialNumber": {
"value": "On Issue"
},
"SchedulingMethod": {
"value": "Finish On"
},
"ScrapLocation": {},
"ScrapOverride": {
"value": false
},
"ScrapWarehouse": {},
"SOLineNbr": {},
"SOOrderNbr": {},
"SOOrderType": {},
"Source": {
"value": "No Source"
},
"SourceDate": {
"value": "2025-01-03T00:00:00-08:00"
},
"SourceOrderType": {},
"SourceProductionNbr": {},
"StartDate": {
"value": "2025-01-31T00:00:00-08:00"
},
"Status": {
"value": "Planned"
},
"UOM": {
"value": "EA"
},
"UpdateProject": {
"value": false
},
"UseFixedMfgLeadTimesforOrderDates": {
"value": false
},
"UseOrderStartDateforMRP": {
"value": true
},
"Warehouse": {
"value": "PBNW"
},
"WIPAccount": {
"value": "1210"
},
"WIPSubaccount": {
"value": "00000"
},
"WIPVarianceAccount": {
"value": "5701"
},
"WIPVarianceSubaccount": {
"value": "00000"
},
"custom": {},
"_links": {
"self": "/AcuProd/entity/MANUFACTURING/23.200.001/ProductionOrder/58191ab0-1aca-ef11-912a-00d86198c979",
"files:put": "/AcuProd/entity/MANUFACTURING/23.200.001/files/PX.Objects.AM.ProdMaint/ProdMaintRecords/58191ab0-1aca-ef11-912a-00d86198c979/{filename}"
}
}
Then I PUT Production Order Details (entity/MANUFACTURING/23.200.001/ProductionOrderDetail?$filter=ProductionNbr eq 'DATETEST'&$expand=Operations):
{
"OrderType": {
"value": "RG"
},
"ProductionNbr": {
"value": "DATETEST"
},
"Operations": [
{
"ControlPoint": {
"value": true
},
"OperationDescription": {
"value": "Cut 12\" TRIM CUT"
},
"OperationNbr": {
"value": "010"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "SHR"
},
"QueueTime": {
"value": 1320
}
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "Upsetting"
},
"OperationNbr": {
"value": "020"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "HDL"
},
"QueueTime": {
"value": 4620
}
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "262\/293"
},
"OperationNbr": {
"value": "030"
},
"OutsideProcess": {
"value": false
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "H\/T"
},
"RunUnits": {
"value": 38
},
"QueueTime": {
"value": 3300
}
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "Testing (F)"
},
"OperationNbr": {
"value": "040"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "TEN"
},
"QueueTime": {
"value": 1320
}
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "Chamfering"
},
"OperationNbr": {
"value": "050"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "CHM"
},
"QueueTime": {
"value": 660
},
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "2\""
},
"OperationNbr": {
"value": "060"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "C\/T"
},
"QueueTime": {
"value": 1980
}
},
{
"ControlPoint": {
"value": false
},
"OperationDescription": {
"value": "Cut 6-1\/4\""
},
"OperationNbr": {
"value": "070"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "SA2"
},
"QueueTime": {
"value": 1320
}
},
{
"ControlPoint": {
"value": true
},
"OperationDescription": {
"value": "Weld"
},
"OperationNbr": {
"value": "080"
},
"RunTime": {
"value": 0
},
"WorkCenter": {
"value": "WLD"
},
"QueueTime": {
"value": 1320
}
}
]
}
Continued in comments...