SO_InvoiceTracking Lines?

SOLVED

I have a pre-write event script where I'm trying to loop through all  packages. When I try this I get an error that .Lines is not supported on that object

Set oLines = oBusObj.AsObject(oBusObj.Lines)

And because of what I just observed I guess I know why. The script fires after moving focus off of a line in the tracking UI, not what I expect for a "Table pre-write" event. So there is not collection here.

What is the best object to use to trap for when an invoice is created with tracking numbers? What object can I use to iterate through all of the packages for an invoice. I'm new to BOI and I'm having sorting out the relationships between these objects. I'm using the File Layouts and Object Ref but it's not clear to me.

Thanks -Ken