by Mike.Sheen » Tue Aug 18, 2015 4:46 pm
indikad wrote:Hi anyone ,
is this a bug ?
I see its possible to change the QuantityOrdered in sales order line - within the event "SalesOrderLineAdded"
however my code below just gets ignored ( no errors just jiwa does not respond to it )
I can however edit other fields using similar syntax - but not this field.
I am on 7.0.127
- Code: Select all
'--- none of the Two below works
Item.QuantityOrdered = decTotalCubicVol
Item.QuantityOrdered = 2
Thanks in advance.
That event is the same event as the SalesOrderLines.Added event and this is raised after adding the item to the sales order lines collection, but before the quantity is set - so if you do set the quantity in there then it will get overwritten.
Listen to the AddInventoryItemEnd event of the SalesOrderLines collection instead, and then you will be able to change the quantity fields and have the changes stick.
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