Thanks Stuart, but my case is a little more complex than that.
The snapshots are not just being created from the front-end.
We've got a business object plug-in that traps shipment book-ins and automatically runs the backorder release process for parts on that book-in.
That part is working. However, once the backorder is released, we need to send a ship instruction to our 3PL. So I have trapped the various events triggered by JiwaBOProcess.StdFunctions.Process to get the new snapshot so I can export the XML. By some trial-and-error over the weekend, I got down to a combination of ProcessSnapshotCreated (gives me InvoiceID and InvoiceHistoryID) and ProcessComplete or BOProcessComplete.
from there, I can:
- Code: Select all
Dim so As SalesOrder = JiwaFactory.CreateBusinessLogic(Of SalesOrder)(Nothing)
so.Setup()
so.Read(InvoiceID)
Dim newSoH As SalesOrderHistory = so.SalesOrderHistorys(InvoiceHistoryID)
and have a valid sales order and history objects. And that history object has carrier details if I'm stepping through with the debugger. But after it leaves my code, they seem to get lost. I'm still trying to work out whether it's before or after JiwaBOProcess.StdFunctions.Process completes, but it goes AWOL by the time I can look at the order in the front-end.
I have some more research to do, but will respond again when I have something more. Possibly even a plugin to demonstrate (although producing something de-cluttered enough for this discussion will have its own challenges)