by Mike.Sheen » Thu May 05, 2022 2:53 pm
The QuantitySOHAvailable property will be set whenever the QuantityThisDelivery property changes also - and that gets changed after the salesOrderForm.SalesOrder.SalesOrderLines.Added and salesOrderForm.SalesOrder.SalesOrderLineAdded events.
Try the AddInventoryItemEnd event instead - but note that if the user changes any of the quantity fields, then it will get reset - so you'd be better off with the Lines PropertyChanged handler where the property name is "QuantityThisDelivery".
Depending on what you need, you might find handling the LineDisplayed event of the form and poking the desired value into the grid instead might work better. I'd normally try to steer away from that - but if it's just to display a value and not to change decisions over how much to backorder or anything, then it's a fairly safe route to take.
Mike Sheen
Chief Software Engineer
Jiwa Financials
If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution