Good day,
I have an aggregate projection where it counts a certain number of records.
[PXProjection(typeof(Select4<SalesContractInformation,
Aggregate<
GroupBy<SalesContractInformation.salesContractNbr,
Count<SalesContractInformation.salesContractLineID>>>>), Persistent = false)]
Now, I am trying to assign the Count column to the DAC,
#region TotalTermCount
public abstract class totalTermCount : IBqlField { }
[PXDBInt(BqlField = typeof(SalesContractInformation.salesContractLineID))]
[PXUIField(DisplayName = "Total Terms Count")]
public virtual int? TotalTermCount { get; set; }
#endregion
The problem with this is that, it returns the MAX value of the SalesContractLineID field instead of the COUNT value.
This question is already been asked, unfortunately there still no answers until now.
GroupBy aggregate with record count in projection DAC
Thank you so much for your replies.