日安,
我有一个聚合预测,它计算一定数量的记录。
[PXProjection(typeof(Select4<SalesContractInformation,
Aggregate<
GroupBy<SalesContractInformation.salesContractNbr,
Count<SalesContractInformation.salesContractLineID>>>>), Persistent = false)]现在,我尝试将Count列分配给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这样做的问题是,它返回SalesContractLineID字段的最大值,而不是COUNT值。
这个问题已经被问过了,不幸的是直到现在还没有答案。
GroupBy aggregate with record count in projection DAC
非常感谢你的回复。
发布于 2019-03-15 09:59:40
我向acumatica支持团队寻求关于这个问题的帮助,但不幸的是到目前为止还没有解决这个问题的方法(也许可以让他们添加这个功能)。
根据此reference,将Count列分配给投影字段似乎是一个限制。
但他们建议使用ScalarCount BQL Operator。
https://stackoverflow.com/questions/55156629
复制相似问题