Plugin Create Work Order from Sales Order
Posted: Tue Jun 18, 2019 6:16 pm
There's a Jiwa-written plugin floating around which creates a works order when a sales order needs qty from a BOM item, replicating the old breakout from Jiwa 6 days.
It was written, I believe, prior to 7.2 as there's a few lines with Manager.Instance (and it's in VB!) so I've tweaked the plugin for version 7.2.
Unfortunately it's erroring "Object reference not set to an instance of an object" when saving the sales order, line 65.
Even if I rem out that line & manually save the sales order, it throws the same error. I've also removed the bool SavingForPrint, bool SavingForSplit values (i.e the False, False) which doesn't help either.
I've attached the plugin here. Can you assist in resolving the error?
It was written, I believe, prior to 7.2 as there's a few lines with Manager.Instance (and it's in VB!) so I've tweaked the plugin for version 7.2.
Unfortunately it's erroring "Object reference not set to an instance of an object" when saving the sales order, line 65.
- Code: Select all
item.SalesOrderLines.SalesOrder.Save(False,False)
Even if I rem out that line & manually save the sales order, it throws the same error. I've also removed the bool SavingForPrint, bool SavingForSplit values (i.e the False, False) which doesn't help either.
I've attached the plugin here. Can you assist in resolving the error?