Im trying to do a customization to where we can do a partial processing of a material queue sequence. When a part is received a PUR-STK transaction is created. But we may need to ship some of these out instead of put up. so we might need to do multiple transfers.
Thought a good way to do this would be to do an inventory transfer with the mtl queue sequence as the reference and then do a bpm to subtract that transferred qty from that sequnce once a transfer was made.
most of it is working except I cannot seem to update the mtl que seq qty.
Below is the code im using within the Erp.BO.InvTransfer.CommitTransfer method directive. If I do a RowMod of == “U” I get an odd error message. ill post that in the next window
var transfer = ds.InvTrans.Where((x)=> x.RowMod == “”).FirstOrDefault(); // get tranfer row
if(transfer != null)
{
// check to make sure reference is the mtlq seq
var partial_mtlqueue_move = (from mtlq in Db.MtlQueue
where mtlq.MtlQueueSeq.ToString() == transfer.TranReference
select mtlq).FirstOrDefault();
if(partial_mtlqueue_move != null)
{
decimal new_qty = partial_mtlqueue_move.Quantity - transfer.TransferQty; // qty to remove from the mtlq seq due to the partial move
var MaterialQueueSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.MaterialQueueSvcContract>(Db); // connect to service Requires Erp.Contracts.BO.MaterialQueue assembly
var MaterialQueueDs = new Erp.Tablesets.MaterialQueueTableset(); // create dataset
MaterialQueueDs = MaterialQueueSvc.GetByID(partial_mtlqueue_move.MtlQueueSeq);
MaterialQueueDs.MtlQueue[0].Quantity = new_qty;
MaterialQueueSvc.Update(ref MaterialQueueDs);
}
error message if I do RowMod = U to trigger the update
System Information
==================
AppServer Connection: https://epicor.leeboy.com/KineticERPPilot
Form Name: Inventory Transfer
Customization Name: VTLB_InvTransfer_07_08_16
Menu ID: IMGO3008
Software Version: 11.1.200.0
============
Business Layer Exception
Requested by is required.
Supply Job is required.
Supply Asm is required.
Supplier Number is required.
Pack ID is required.
Order is required.
Line is required.
Rel is required.
Description is required.
PO is required.
PO Line is required.
PO Release is required.
RMA is required.
RMA Line is required.
Rcv is required.
You should not have to. If you do a proper partial transfer the remaining quantity will be left for another transfer. We are lot tracked and may process one queue several times.
Do a trace of a and see if any other methods are called, but I am assuming some Epimajic happens to update the queue after it is processed.
Thanks for the reply Greg. I didnt realize we could to partials on a mtl queue seq. the warehouse folks were telling me it would go away if processed. but tested and it deducts the qty. so dont need a mod. would be nice to know how to modify the mtl q seq. I couldnt modify the qty within the material queue manager but did trace changing priority or assigning an employee and all it called was update. all of the rowmod’s were blank.
but sounds like i dont need to worry about it. thanks for the help!