How to update PO Dtl UD field when the Po is created from PO suggestions

we are trying to store the standard cost of a part on the PO Dtl record.

We created a UD field on PODtl to store the standard cost on the PODtl for that part at the time the PO is created. we can update this field no problem when the po is created manually.

We dont know how to update the value when the po is generated via Po suggestions Buy Action.
Ran a trace log and dont see what method is creating PO.

Anyone know a way to do this?

What method are you using to do it when manually creating a PO?

C# code customization on po entry when the partnum is added to the line.

You could probably do a Data Directive that would handle both cases - The manual and the automatic. How comfortable are you with BPM’s?

that was where we were headed, but didnt see how to use the baq we made (sum std cost) to pull in the value to the UD field.

You can use a Set Field widget to update the UD field, and in the expression, use LINQ code to calculate the Total Std cost.

Would you use the LINQ code to pull in the value from partcost table?

Yes. You might need to use a Exceute Custom code to combine the various components that make up a Part’s cost (Material, Burden, Labor etc…) and assing to a variable. Then use a Set Field to assing your field that variable.

BIG NOTE:… This DD only fires when the line is saved. So if you want the value to show in the UI, after the partnum is changed, and before a Save, then you have to use a Method Directive BPM.