I've created UDFs to track MAC Address, IP Address, and Room Number related to stock inventory items within the PO302000 form. I created the same in the IN301000 form. I also modified the workflow within each of those to allow those fields to be modifiable regardless of the status of the documents. All of that has worked. For the most part, simple stuff to this point (I think!). Now I am attempting to process a PO -> POR -> Inventory Receipt. The UDF data entered within the line details of the POR is not carrying forward to the Inventory Receipt form where I hoped/thought it would display in the line details as well. Can anyone help me understand what I'm missing. If you've not seen any of my other topics, I am not a developer by trade, but I am gaining my knowledge of Acumatica customizations through trial and error (and Community help!) as I go. Acumatica 2022 R2, Build 22.205.0026
Solved
UDFs from Purchase Receipt (PO302000) not refleced in IN Receipt (IN301000)
Best answer by Vignesh Ponnusamy
Hi
Kindly try something like below,
public delegate IEnumerable ReleaseDelegate(PXAdapter adapter);
[PXOverride]
public IEnumerable Release(PXAdapter adapter, ReleaseDelegate baseMethod)
{
PXGraph.InstanceCreated.AddHandler<INReceiptEntry>((graphINReceiptEntry) =>
{
graphINReceiptEntry.RowPersisting.AddHandler<INTranSplit>((sender, e) =>
{
INTranSplit currentINTranSplit = (INTranSplit)e.Row;
INTranSplitExt TranSplitExt = PXCache<INTranSplit>.GetExtension<INTranSplitExt>(currentINTranSplit);
POReceiptLineSplit currentPOReceiptLineSplit = PXSelect<POReceiptLineSplit, Where<POReceiptLineSplit.receiptNbr,
Equal<Required<POReceiptLineSplit.receiptNbr>>,
And<POReceiptLineSplit.receiptType,
Equal<Required<POReceiptLineSplit.receiptType>>,
And<POReceiptLineSplit.inventoryID, Equal<Required<POReceiptLineSplit.inventoryID>>,
And<POReceiptLineSplit.qty, Equal<Required<POReceiptLineSplit.qty>>
>>>>>.Select(Base, graphINReceiptEntry.receipt.Current.POReceiptNbr,
graphINReceiptEntry.receipt.Current.POReceiptType, currentINTranSplit.InventoryID,
currentINTranSplit.Qty); //Query to Get the mathcing POReceiptLineSplit. Kindly add or remove conditions as required
POReceiptLineSplitExt ReceiptLineSplitExt = PXCache<POReceiptLineSplit>.GetExtension<POReceiptLineSplitExt>(currentPOReceiptLineSplit);
//POReceiptLineSplitExt ReceiptLineSplitExt = Base.transactions.Cache.GetExtension<POReceiptLineSplitExt>(currentPOReceiptLineSplit);
TranSplitExt.UsrPORecptLnDetSplitRoomNbr = ReceiptLineSplitExt.UsrPORecptLnDetSplitRoomNbr;
TranSplitExt.UsrPORecptLnDetSplitMACAdd = ReceiptLineSplitExt.UsrPORecptLnDetSplitMACAdd;
TranSplitExt.UsrPOReceptLnDetSplitIPAdd = ReceiptLineSplitExt.UsrPORecptLnDetSplitIPAdd;
/* END Mike attempt to add the other Custom User Fields for INTranSplit */
});
});
return baseMethod(adapter);
}
Hope that helps.! Good Luck.!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.