Page 1 of 1

Importing a shipment Book In via File Watcher

PostPosted: Wed Mar 09, 2022 10:26 am
by DannyC
Hi,

I've written a plugin to create a new Book In from a CSV file via the File Watcher, or Plugin Scheduler Service in 7.2.1.
Plugin attached.
It works nicely when I don't have serialised items, or items without an expiry date.

But for those items where I need to write to the bookin Line Details to populate the serial/batch and/or expiry date, I can't work out how to get to the line details from the bookin line. I've tried a For Each loop but can't find the type for LineDetails.

I've attached my plugin and a sample import file.
Fortunately I am provided the originating shipment LineID so can get a match to the landed cost shipment.

If I could just be given some guidance on how to populate serial/batch and/or expiry date?

Re: Importing a shipment Book In via File Watcher  Topic is solved

PostPosted: Wed Mar 09, 2022 1:14 pm
by DannyC
Stuart gave me a tip.
Instantiate a LineDetails object, then use
Code: Select all
BookInLine.LineDetails.Add(myDeets)


So, attached is a plugin which seems to work for me.