Page 1 of 1

Shipment book-in from code

PostPosted: Mon Feb 22, 2016 5:27 pm
by perry
Hi,

Jiwa 7.0.149

I'm trying to create shipment book-in, assign qty (with serial no) and activate from .NET app.

so far, I'm having trouble adding line detail record
Code: Select all
oLineDetail = New JiwaLandedCost.Shipment.BookInLineDetail
oLineDetail.RecID = JiwaApplication.Manager.Instance.Database.NewGUID
oLineDetail.Quantity = BatchQty
oLineDetail.SerialNo = SerialNo
oLineDetail.ExpiryDate = ExpiryDate
oLineDetail.BinLocation = ""
oShpLine.BookInLineDetails.Add(oLineDetail)


Code won't compile because "Set" accessor of those properties are not accessible.
Similar code works in GRN.

Re: Shipment book-in from code  Topic is solved

PostPosted: Tue Feb 23, 2016 7:50 pm
by Mike.Sheen
You probably don't need to set the RecID, it will be set for you when added.

The binlocation is likely not a string, but an entity, so look the the methods and use a read method - e.g.:

oLineDetail.BinLocation.ReadRecordFromDescription("...") or oLineDetail.BinLocation.ReadDefault, et cetera - intellisense should reveal what is available.