你好,所以我要从清单项目中获取自定义字段值,并将其作为默认值更新到我的aptran上,这样就可以了
protected void APTran_InventoryID_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
{
var row = (APTran)e.Row;
cache.SetDefaultExt<APTranExt.usrWholdingatc>(e.Row);
}
在这里我将其设置为默认值
public class APTranExt : PXCacheExtension<PX.Objects.AP.APTran>
{
#region UsrWholdingatc
[PXDBString(10)]
[PXUIField(DisplayName = "Wholdingatc")]
[PXDefault(typeof(Search<InventoryItemExt.usrWHoldingtax, Where<InventoryItem.inventoryID, Equal<Current<APTran.inventoryID>>>>))]
[PXSelector(
typeof(Search<withholdingtax.atc>),
typeof(withholdingtax.description),
typeof(withholdingtax.taxRate))]
public virtual string UsrWholdingatc { get; set; }
public abstract class usrWholdingatc : PX.Data.BQL.BqlString.Field<usrWholdingatc> { }
#endregion
如果aptran清单ID与清单项目清单ID匹配,我想获取我的清单项目Ext.usrWHoldingtax的值,我做得正确吗?我已经在这里呆了好几天了,现在我似乎无法实现
提前谢谢