AX 2009 - Make Update Qty in purchparmline mandatory when posting delivery note

Hi all,

I have a requirement to ensure that all open purchase order lines are displayed when posting delivery note but the update field should be set to zero and made mandatory (still accepting zero as a value). Can anyone help me out.

Hi Morten,

Try below one,

Open PurchEditLine form, under DatsSource node find PurchParmLine table. Here you will found the field ReceiveNow.

here override validate method.0211.Untitled.png

Paste below code in this method

public boolean validate()

{

boolean ret;

If(PurchParmLine.ReceiveNow == 0)

{

throw error(“Posting cannot be done with zero quantity, Select the appropriate Gate Entry”);

}

ret = super();

return ret;

}

I hope i will work for you.