I want to Disable the The UnitPrice and Qty in P.O-> Lines

Hi,

After P.O First Tme conformation for that P.O->Line the Price and Qty has to be Disable(not allow to edit)

what basis I want to disable and where what code i want to write.

Sunil

So just to confirm the user sends the supplier a purchase order, the supplier says it is not $3 but $2.5 and the user must delete the purchase order and re-enter?

Or the supplier says I know you have ordered 20 but I have 10 - that 20 must remain on order because it is non-editable, telling planning you are buying 10 you cannot buy?

What happens if they then change the item on teh line - the quantity and price are not refreshed? What happens if they change the currency of the order - the prices are not recalculated?

Not a developer so I cannot answer your question, but I am questioning the requirement and the problems it can cause downstream.

Why not remove the rights for them to edit the purchase order - allow them to create new but never edit. Would that not do it for you?

Hi,

thats true - you need to consider all the things what - adam has said…

technically speaking - you can do it.

Override the - “Active” method of purchLine data source in the form.(this code may help u)

select firstonly vendPurchOrderTrans where vendPurchOrderTrans.PurchId == PurchLine.purchId

&& vendPurchOrderTrans.InventTransId == PurchLine.InventTransId;

If(vendPurchOrderTrans )

PurchLine_ds.object(fieldnum(PurchLIne, PurchPrice)).allowedit(false);