I have tried both events
- Code: Select all
soForm.SalesOrder.SalesOrderLines.Added += Attkey_SOLineAdded;
soForm.SalesOrder.SalesOrderLineAdded += Attkey_SOLineAdded2;
but they set the QuantityOrdered to 1 even though I have the following code to set 3.
- Code: Select all
int myQty = 3;
soLine.QuantityOrdered = myQty;
I'm suspecting that it might be a timing issue - like the line hasn't completely finished getting added to the grid & I am setting the value but then it gets overwritten with the system DefaultQuantity. What's the best way to force the QuantityOrdered as the line is getting added?