Change PO line unit cost using the POAdpater

  • 25 May 2023
  • 1 reply

Hi All (E10.2.600)

I have a UI customization on Customer Shipment Entry that will create a purchase order based on certain conditions.

Everything was working but I was not anticipating that some of the part numbers involved would have a supplier price list and for these specific POs, that the customization is creating, the unit cost needs to be zero.
I did as UI trace and a BO trace to find how how to set the price to zero but it is not working.

The code snippet I have is:

poAdapter.POData.PODetail[lineCount].RowMod = “U”;
poAdapter.POData.PODetail[lineCount].DocScrUnitCost = 0;
poAdapter.ChangeUnitPriceConfirmOverride(out sConfirmMsg);

I’ve tried running this after creating a new PO line but before saving the PO line and I’ve tried moving it ti after the PO line is saved.
In both cases, the price does not change.

I am also updating the PO line Override Price List checkbox, which is getting updated.

Any ideas on what I am missing to change the PO line unit cost?

1 reply

Userlevel 1

Dear Joe, 

Have you looked at the fields PricingUnitPrice, DocPricingUnitPrice, OverridePriceList, and SelCurrPricingUnitPrice?  Normally in Finance, the term “cost” differs from the PO price, but unfortunately Epicor does label many PO price fields with “cost” in the field name.  These are UnitCost, DocUnitCost, ExtCost, etc.  So in the PO detail table, there is this odd mixture of “price” and “cost” both being used in field names.




Monty Wilson
Vice President – North America
Epicor Users Group