How to reference a UD Field from another Table

@James_Morris This is easy with a widget, but I also did a c example.

Update Table by Query will do this since partNum is already a parameter.


Query

Fields

Binding

code Not tested. You could also use the parameter partNum

foreach (var ttOrderDtlRow in (from ttOrderDtl_Row in ds.OrderDtl
                                     where ttOrderDtl_Row.Company == Session.CompanyID
                                     select ttOrderDtl_Row))
{
   
    var sc01 = Db.Part.Where(w => w.PartNum == ttOrderDtlRow.PartNum).Select(s => s.ShortChar01).FirstOrDefault();
    
    if (sc01 != null)
    {
        ttOrderDtlRow.SetUDField("ShortChar01",sc01);
    }
            
            
}