Hello All,
I am trying to override a DAC field “get” method. below is the original DAC field declaration:
#region AmountToComplete
public abstract class amountToComplete : PX.Data.BQL.BqlDecimal.Field<amountToComplete> { }
bPXBaseCury()]
bPXDefault(TypeCode.Decimal, "0.0", PersistingCheck = PXPersistingCheck.Nothing)]
bPXUIField(DisplayName = "Cost To Complete", Enabled = false)]
public virtual Decimal? AmountToComplete
{
rPXDependsOnFields(typeof(budgetedAmount), typeof(completedAmount))]
get { return Math.Max(0, BudgetedAmount.GetValueOrDefault() - CompletedAmount.GetValueOrDefault()); }
}
#endregion
and I want to completely override it so below is what I have put in my DAC Ext:
#region AmountToComplete
public abstract class amountToComplete : PX.Data.BQL.BqlDecimal.Field<amountToComplete> { }
protected Decimal? _AmountToComplete;
public Decimal? AmountToComplete
{
get { return Math.Max(0, this._UsrHCLForecastToComplete); }
}
#endregion
With my above override, I would expect the original code not be executed and I get the “Math.Max(0, this._UsrHCLForecastToComplete)” but when I trace, the platform executes the original codes and returns the value as per the original formula. I am running on 21R2 and the DAC is a normal BQL table.
Any help is appreciated.