Sales Order line adding, when does it fire in v 7.2?
Typically I use the SalesOrder.SalesOrderLineAdding or SalesOrder.SalesOrderLines.Adding when I need to write some code to intercept for whatever reason adding an item to a sales order. e.g. maybe that staff isn't allowed to add that item, or it doesn't comply with some other rule.
This has worked fine up to 7.0.175.
I'm doing some plugins in 7.2 and I am finding that both those events fire when a sales order is loaded also, not just when a line is added.
The only event which seems to fire as a sales order line is added is SalesOrder.SalesOrderLines.AddInventoryItemStart. The problem with AddInventoryItemsStart is that it has the following arguments
but the SalesOrderLine object KitHeader is null.
So I guess the issue is twofold
i) The line adding events fire even if you're just loading a sales order, it shouldbe when a new item is added
ii) The KitHeader object passed into AddInventoryItemsStart is null. Shouldn't it be the line object?
Cheers
This has worked fine up to 7.0.175.
I'm doing some plugins in 7.2 and I am finding that both those events fire when a sales order is loaded also, not just when a line is added.
The only event which seems to fire as a sales order line is added is SalesOrder.SalesOrderLines.AddInventoryItemStart. The problem with AddInventoryItemsStart is that it has the following arguments
- Code: Select all
string inventorySeed, JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLineCollection.SalesOrderLineInventorySeedTypes KitSeedType, ref object NewKey ,JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrderLine KitHeader, int LineNumber)
but the SalesOrderLine object KitHeader is null.
So I guess the issue is twofold
i) The line adding events fire even if you're just loading a sales order, it shouldbe when a new item is added
ii) The KitHeader object passed into AddInventoryItemsStart is null. Shouldn't it be the line object?
Cheers