【问题标题】:How do I default the current date in a Acumatica Generic Query?如何在 Acumatica 通用查询中默认当前日期?
【发布时间】:2014-10-06 22:15:59
【问题描述】:

如何在 Acumatica 通用查询中默认当前日期?日期需要默认为当前日期,而不是硬编码的特定日期。

【问题讨论】:

    标签: erp acumatica


    【解决方案1】:

    我建议您覆盖 Graph 中的查询。 例如

    public class YourGraph : PXGraph<YourGraph>
    {
         public PXSelect<YourDac> Query;
         public IEnumberable query()
         {
             DateTime tod = DateTime.Now;
             var result = PXSelect<YourDac,Where<YourDac.DateTimeField,Equal<Required<YourDac.DataTimeField>>>>.Select(this, tod);
             return result;
    
                    }
    }
    

    Acumatica 将用 tod 值替换必需部分

    【讨论】:

      【解决方案2】:

      对于参数,很遗憾您只能指定特定日期。对于显示在结果中的列,您可以使用 =Today()

      等表达式

      对于参数,根据您的情况,一种可能的解决方案是将其留空,并在您的条件中检查 null 并使用表达式将 Null 替换为 =Today().. 因此,如果用户将该字段留空,您将返回记录基于今天/等..

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-03-27
        • 2019-09-12
        • 1970-01-01
        • 1970-01-01
        • 2016-11-29
        • 1970-01-01
        相关资源
        最近更新 更多