-->

对客户筛网过滤不使用超过一个过滤器(Filtering on Customer Screen doe

2019-10-21 05:10发布

我现在用的是AR303000屏幕来搜索客户。 如果我添加多个过滤器只应用第一滤波器。 此外,结果集不包括GeneralInfoMainAddress线。 这可能就是为什么过滤器不工作。

AR303000Content AR303000 = context.AR303000GetSchema(); context.AR303000Clear();

        List<Command> cmds = new List<Command>();
        cmds.Add(AR303000.CustomerSummary.ServiceCommands.EveryCustomerID);

        cmds.Add(AR303000.CustomerSummary.CustomerID);
        cmds.Add(AR303000.CustomerSummary.CustomerName);
        cmds.Add(AR303000.GeneralInfoMainAddress.AddressLine1);
        cmds.Add(AR303000.GeneralInfoMainAddress.City);
        cmds.Add(AR303000.GeneralInfoMainAddress.State);
        cmds.Add(AR303000.GeneralInfoMainAddress.PostalCode);

        List<Filter> filters = new List<Filter>();
        filters.Add(new Filter()
        {
            Field = new Field()
            {
                FieldName = AR303000.CustomerSummary.CustomerName.FieldName,
                ObjectName = AR303000.CustomerSummary.CustomerName.ObjectName
            },
            Condition = FilterCondition.Contain,
            Value = "DOE, JOHN",
            Operator = FilterOperator.And
        });
        filters.Add(new Filter()
        {
            Field = new Field()
            {
                FieldName = AR303000.GeneralInfoMainAddress.AddressLine1.FieldName,
                ObjectName = AR303000.GeneralInfoMainAddress.AddressLine1.ObjectName
            },
            Condition = FilterCondition.Contain,
            Value = "255",
            Operator = FilterOperator.And
        });

        var AR303000Export = context.AR303000Export(cmds.ToArray(), filters.ToArray(), 0, false, false);

        return AR303000Export[0][0];

Answer 1:

Web服务只能过滤在屏幕上的主要观点的领域,在这种情况下AR303000.CustomerSummary。 如果你尝试在别的过滤,系统不会抛出异常,而是丢弃该过滤器。

如果您需要能够通过这些信息来进行筛选,我会建议你创建一个通用的调查,关于你所需要的表的连接,并且,你会与其他任何查询屏幕,通过网络服务使用GI屏幕。



文章来源: Filtering on Customer Screen does not use more than one filter
标签: acumatica