Hi all - another Sales Order Detail question.
working on a script that will bring over the user keyed in cost from the SO to the Purchase order on drop ship line items.
I tried using the SO_SalesOrderDetail UnitCost field
retVal = oLines.GetValue(""UnitCost"", ItemUnitCost)
dbgRetVal = oScript.DebugPrint("" Sales Order Detail (unit cost) is "" & ItemUnitCost)
But this always returns the cost of the item NOT the cost the user keyed in.
I am firing the script on PO_PurchaseOrderHeader table Pretotals.
I have the script working - in the trace window I see it fire upon clicking the Generate PO button from the SO totals tab. Problem is it always grabs the unit cost of the item - not the unit cost the user keyed in on the SO detail.
I tried multiplying the cost by 10% (eg. retVal = oLines.SetValue(""UnitCost"",ItemUnitCost*1.10) 'Insert purchase order detail unit cost) and my PO shows the item cost increased by 10%. So it ~appears~ that my logic is sound (the script part that writes the cost to the po) but for some reason i cant seem to get the cost the user keyed in on the Sales Order. Which field is it?
I checked the SO_DropShip table and there isn't a cost field there.
Any ideas where to get that drop ship unit cost??