REST: POSvc not handling PODetail.DocScrUnitCost

Environment: ERP 10.2.100.32
Rest: v1

I am passing the following JSON to POSvc.UpdateExt

{
	"ds": {
		"POHeader":
		[
			{
				"Company":"######",
				"BuyerID":"Plating",
				"ShipViaCode":"AMFA",
				"VendorNum":2,
				"VendorVendorID":"1256",
				"Approve":false
			}
		],
		"PODetail":
		[
			{
				"Company":"######",
				"POLine":1,
				"PartNum":"002952A433U",
				"CalcTranType":"PUR-SUB",
				"CalcJobSeqType":"S",
				"CalcJobNum":"172299S",
				"CalcAssemblySeq":0,
				"CalcJobSeq":40,
				"CalcOurQty":###.00000000,
				"DocScrUnitCost":0.###
			}
		]
	},
	"continueProcessingOnError": false,
	"rollbackParentOnChildError": true
}

The call is working correctly except for filling in the Unit Price.

As one can see in the JSON, I am passing PODetail.DocScrUnitCost and the PO in Epicor is showing 0.

Any assistance, tips, tricks, voodoo will be helpful.

You need ScrUnitCost and DocScrUnitCost

I made the following change

{
	"ds": {
		"POHeader":
		[
			{
				"Company":"######",
				"BuyerID":"Plating",
				"ShipViaCode":"AMFA",
				"VendorNum":2,
				"VendorVendorID":"1256",
				"Approve":false
			}
		],
		"PODetail":
		[
			{
				"Company":"#####",
				"POLine":1,
				"PartNum":"002952A433U",
				"CalcTranType":"PUR-SUB",
				"CalcJobSeqType":"S",
				"CalcJobNum":"172299S",
				"CalcAssemblySeq":0,
				"CalcJobSeq":40,
				"CalcOurQty":500.00000000,
				"UnitCost":434.83000,
				"DocUnitCost":434.83000,
				"SrcUnitCost":434.83000,
				"DocScrUnitCost":434.83000,
				"IUM": "K",
				"PUM": "K",
				"CostPerCode":"M"
			}
		]
	},
	"continueProcessingOnError": false,
	"rollbackParentOnChildError": true
}

It still putting a 0 in PODetail.UnitPrice.

I had a typo. ScrUnitCost vice SrcUnitCost.

Tested successfully. Implementing into C# pgm .

Thanks @aarong

1 Like