I am trying to get a UDField value from the ttDemandDetailImport temp table during an EDI import.
This code is for the base process of Erp.DemandImportEntry.ImportEDIb4Val. The value I am receiving is 0, but the value that eventually makes its way to the SO is not zero. It is not zero in the Demand Detail records that are posted either. Do UD fields get updated later in the process? It does not error in the try-catch either.
I very new to epicor, but from the examples I found here and other places seem to be exactly how I call the UDField function. The lines above all get the correct data from the temp table.
TPCumulativeQty = ttDemandDetailImport.CumulativeQty;
TPCumulativeDate = ttDemandDetailImport.CumulativeDate;
TPLastShipQty = ttDemandDetailImport.LastShipmentQty;
TPLastShipDate = ttDemandDetailImport.LastShipmentDate;
TPLastShipRef = ttDemandDetailImport.LastShipmentID;
try
{
TPPQty = ttDemandDetailImport.UDField<Decimal>("Number01");
sTPQty = "No Error";
}
catch
{ TPPQty = 9999;
sTPQty = "Error";
}