# Update Material Queue Seq Qty after inventory transfer

**URL:** <https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382>\
**Category:** Kinetic ERP\
**Created:** [June 23, 2023, 2:57pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382 "2023-06-23T14:57:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jboyette](https://www.epiusers.help/user_avatar/www.epiusers.help/jboyette/32/36590_2.png) [@jboyette](https://www.epiusers.help/u/jboyette)\
**Post date:** [June 23, 2023, 2:57pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382/1 "2023-06-23T14:57:41Z")

</div>

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);
      
      
}

```

}

 ![image](https://www.epiusers.help/uploads/default/original/3X/c/5/c5388d568a36f3a0d65485d51202b5924a71e8fc.jpeg)

---

<div class="post-metadata">

**Author:** ![jboyette](https://www.epiusers.help/user_avatar/www.epiusers.help/jboyette/32/36590_2.png) [@jboyette](https://www.epiusers.help/u/jboyette)\
**Post date:** [June 23, 2023, 2:59pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382/2 "2023-06-23T14:59:11Z")

</div>

error message if I do RowMod = U to trigger the update

## System Information

==================

AppServer Connection: [https://epicor.leeboy.com/KineticERPPilot](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.

Exception caught in: Epicor.ServiceModel

## Error Detail

============

##!Correlation ID:##! bc23de1b-4e55-475b-a775-ce6253fff7e0  
##!Message No.:##! 1  
##!Description:##! Requested by is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! RequestedByEmpID  
##!Message No.:##! 2  
##!Description:##! Supply Job is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! JobNum  
##!Message No.:##! 3  
##!Description:##! Supply Asm is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! AssemblySeq  
##!Message No.:##! 4  
##!Description:##! Supplier Number is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! VendorNum  
##!Message No.:##! 5  
##!Description:##! Pack ID is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! PackSlip  
##!Message No.:##! 6  
##!Description:##! Order is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! OrderNum  
##!Message No.:##! 7  
##!Description:##! Line is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! OrderLine  
##!Message No.:##! 8  
##!Description:##! Rel is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! OrderRelNum  
##!Message No.:##! 9  
##!Description:##! Description is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! PartDescription  
##!Message No.:##! 10  
##!Description:##! PO is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! PONum  
##!Message No.:##! 11  
##!Description:##! PO Line is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! POLine  
##!Message No.:##! 12  
##!Description:##! PO Release is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! PORelNum  
##!Message No.:##! 13  
##!Description:##! RMA is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! RMANum  
##!Message No.:##! 14  
##!Description:##! RMA Line is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! RMALine  
##!Message No.:##! 15  
##!Description:##! Rcv is required.  
##!Program:##! Epicor.Ice.dll  
##!Method:##! ValidateColumn  
##!Line Number:##! 251  
##!Column Number:##! 17  
##!Table:##! MtlQueue  
##!Field:##! RMADisp

## Client Stack Trace

==================  
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet dataSets)  
at Erp.Proxy.BO.InvTransferImpl.CommitTransfer(InvTransferDataSet ds, String& LegalNumberMessage, String& partTranPKs)  
at Erp.Adapters.InvTransferAdapter.CommitTransfer(String& legalNumberMessage, String& partTranPKs)

---

<div class="post-metadata">

**Author:** ![jboyette](https://www.epiusers.help/user_avatar/www.epiusers.help/jboyette/32/36590_2.png) [@jboyette](https://www.epiusers.help/u/jboyette)\
**Post date:** [June 23, 2023, 2:59pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382/3 "2023-06-23T14:59:57Z")

</div>

so does anyone know how to modified an existing mtlq row?

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [June 23, 2023, 3:27pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382/4 "2023-06-23T15:27:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jboyette](https://www.epiusers.help/user_avatar/www.epiusers.help/jboyette/32/36590_2.png) [@jboyette](https://www.epiusers.help/u/jboyette)\
**Post date:** [June 23, 2023, 3:35pm UTC](https://www.epiusers.help/t/update-material-queue-seq-qty-after-inventory-transfer/104382/5 "2023-06-23T15:35:53Z")

</div>

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!
