Hi Team,
I like to update QTY (Purch.Qty) = 0 for any item in purchLine while adding new line in Purchase Order.
I noticed , When I select an Item and Config Id then only Qty get update in Purch.Qty.
How we can skip this?
later user like to update the qty to 0 to some qty.
pls give me more shed on this.
thanks!
Thanks Mohit
Let me check and will update you
Yes, you will get current record in CoC as well. I think PurchLine buffer is parameter in this table, you can use that parameter to fetch value and set the value as per your requirement. Then call next statement.
Thanks Mohit,
In event handler, we got the current record buffer. But in CoC , how will get the current record buffer?
Becze I need to check for specific purchid and the line from the purchline.
Pls give me more shed on this
Yes, create CoC on modifiedPurchQty method, check if PurchLine has RecId, if not then its a new line getting created. Check if your parameter is yes, then set PurchQty to zero else run the standard code.
Thanks Mohit,
You mean to say to create a CoC for modifiedPurchQty and before next to assign purchLine.purchQty =0;
Then call the standard method.
Is it?
Hi, When ItemId is changed in Purchase order line, not only qty but many other fields gets updated in the system. If you update the Qty to zero after the system has called standard methods, I believe there will be data inconsistency issue because the fields are updated as per new Qty but later you have changed it to Zero. So better to change it to Zero first and then call standard methods.
Please check ItemIdModified method in PurchLine Datasource in PurchTable form. There is a method modifyPurchQty in PurchLine table which will be called.
You can write the code in modified field of PurchLine for these 2 fields post next.
André Arnaud de Cal...
291,996
Super User 2025 Season 1
Martin Dráb
230,853
Most Valuable Professional
nmaenpaa
101,156