hello Community,
i have been trying to create a new field and apply the summation logic for the particular field in the Subcontracts screen. What I have done till now is:
Created 3 new fields: A, B & C where C=A+B.
I have created a DAC Extension for Objects.PO.POOrder:
And Applied the below code:
using CRLocation = PX.Objects.CR.Standalone.Location;
using PX.Common;
using PX.Data.ReferentialIntegrity.Attributes;
using PX.Data.WorkflowAPI;
using PX.Data;
using PX.Objects.AP;
using PX.Objects.CM.Extensions;
using PX.Objects.CN.Subcontracts.SC.Graphs;
using PX.Objects.Common.Bql;
using PX.Objects.Common;
using PX.Objects.CR;
using PX.Objects.CS;
using PX.Objects.EP;
using PX.Objects.IN;
using PX.Objects.PM;
using PX.Objects.PO;
using PX.Objects;
using PX.SM;
using PX.TM;
using System.Collections.Generic;
using System.Web.Configuration;
using System;
namespace Addition
{
public class POOrderExt : PXCacheExtension<PX.Objects.PO.POOrder>
{
#region UsrA
[PXDBDecimal]
[PXUIField(DisplayName="A")]
public virtual decimal? UsrA { get; set; }
#endregion
#region UsrB
[PXDBDecimal]
[PXUIField(DisplayName="B")]
public virtual decimal? UsrB { get; set; }
#endregion
#region UsrC
[PXDBDecimal]
[PXUIField(DisplayName="C")]
[PXFormula(typeof(Add<usrA, usrB>))]
public virtual decimal? UsrC { get; set; }
public abstract class usrC : PX.Data.BQL.BqlDecimal.Field<usrC> { }
#endregion
}
}
What is it that I am missing here or not doing correctly?
Thanks.