【问题标题】:how to pxselector pxseach with condition in acumatica如何在 acumatica 中使用条件 pxselector pxseach
【发布时间】:2020-03-24 18:52:49
【问题描述】:

你好,我正在做一个项目,我必须在我的选择器上放置一个放置条件,我知道如何进行 pxselect,但我现在在 dac 上做它

 #region UsrMarginCodess
        [PXDBString]
        [PXUIField(DisplayName = "Margincode")]
        [PXSelector(
            typeof(Search<Margincode.code, Where<Margincode.show, Equal<true>>>),
                typeof(Margincode.code))]
        public virtual string UsrMarginCodess { get; set; }
        public abstract class usrMarginCodess : PX.Data.BQL.BqlString.Field<usrMarginCodess> { }
        #endregion

这是我的代码,我想选择显示为 true 的 margincode 我只想在我的选择器上显示正确的字段

提前谢谢你

【问题讨论】:

    标签: c# acumatica


    【解决方案1】:

    尝试将您的条件更改为Equal&lt;True&gt;

    【讨论】:

      【解决方案2】:

      每个网格都应该在图表内有一个视图。如果您只想在网格中显示带有Margincode.show == true 的记录 - 您只需在视图声明中添加一个条件。例如

      public PXSelect<Margincode, 
          Where<Margincode.show, Equal<True>>> MarginCodes;
      

      您还可以使用标准的 Acumatica 过滤器机制按某些条件过滤记录。请参阅“发布 AP 文档”(AP501000) 屏幕作为示例。

      【讨论】:

      • 如果它是一个机会选择器,我想从中做出一个选择器
      • 什么意思?您的选择器 Search>> 中已经有了正确的条件,您可以在任何 DAC 实体上使用它。它将创建一个单独的数据库请求并使用 show = true 选择 Margincode 记录
      猜你喜欢
      • 2022-12-15
      • 2016-08-31
      • 2021-05-12
      • 2016-02-27
      • 2022-01-15
      • 2021-08-20
      • 1970-01-01
      • 2018-04-14
      • 1970-01-01
      相关资源
      最近更新 更多