【问题标题】:Rows are disappearing from Processing screen行正在从处理屏幕中消失
【发布时间】:2020-04-02 18:14:46
【问题描述】:

我正在使用处理屏幕来设置选定的行状态。我正在使用 PXFilteredProcessingJoin 和 PXFilter,我的主视图是 PXFilter。

我的处理过滤器委托是单例的,它显示处理屏幕,但在关闭处理网格后仅显示已处理的记录,我必须强制刷新以根据我的过滤器显示所有记录,我缺少什么来显示所有记录?

/// Constructor
 public OrderStatusChangeProcess() {
            OrderSampling.SetSelected<RecOrder.selected>();
            OrderSampling.SetProcessDelegate(processOrder);           
        }


    public static void processOrder(List<RecOrder> listProcessOrder) {
        //here set variable for global error message.
        var globalError = false;
        //here I have a variable for the po orderNbr nbr to tie to the lines
        var orderNbr = string.Empty;
        //here I create the graph that will do the processing, can be custom graph also
        OrderEntry graph = PXGraph.CreateInstance<OrderEntry>();
        //now cycle through the list of records and process each.
        foreach(var order in listProcessOrder) {
            //here I have a local variable for each line
            var lineError = false;
            //it is also possible to add transaction support here if only needed for the line item
            try {
                graph.Clear();
                //assign the new receipt nbr for messages
                orderNbr = order.OrderCD;
                //set the next record to be processed to the current of the graph
                graph.Orders.Current = order;                    
                order.Status = "I";
                graph.Orders.Update(order);
                //then save the results, including the processed flag or condition
                graph.Save.Press();
            }
            //catch any errors that happen in the receipt graph and format the message here, you can
            // also write code to a log or record extension to fix the error
            catch(Exception e) {
                //set line error to true so will skip the process correct below
                lineError = true;
                //set globaError flag to true to get the global message
                globalError = true;
                //create a custom error message to post on the grid
                var message = "Error Processing Order: " + orderNbr + ": " + e.Message;
            }
            //create a process complete message and assign to the grid line
            var messageTwo = " Order number: " + orderNbr + " Was Processed.";
            if(!lineError)
                PXFilteredProcessing<RecOrder, OrderFilter>.SetInfo(listProcessOrder.IndexOf(order), messageTwo);
        }
        //add last create the global error message that displays at the top of the screen
        if(globalError)
            throw new PXOperationCompletedWithErrorException("At Least One  order not Processed.");

    }

【问题讨论】:

    标签: acumatica acumatica-kb


    【解决方案1】:

    这是处理屏幕的正常行为。它在处理后仅在网格中显示已处理的记录,最终用户需要单击“取消/刷新”按钮或刷新整个页面才能返回完整列表。您不应更改处理屏幕的正常行为。

    您可以将您的屏幕与Process Export Scenario SM207035 进行比较

    处理后,只有处理后的记录会显示在网格中,这是标准的期望行为。

    【讨论】:

    • 否则,我强烈建议不要通过将 PXProcessing/PXFilteredProcessing 视图替换为 PXSelect 视图来使其成为处理屏幕。
    • 感谢先生的回复,但是在“电子邮件待处理”、“处理订单”等屏幕中,它显示所有记录而无需单击刷新。他们过得怎么样?
    • 这些屏幕与您的屏幕不同,它们使用的是不同的 UI,该 UI 记录在以下链接中。请注意,此 UI 可能更具限制性,您无法轻松自定义它。 asiablog.acumatica.com/2019/12/…
    • 在本文档的第 17 页,有关于“处理”对话框的其他信息:adn.acumatica.com/content/uploads/2019/04/…
    • 第17页建议隐藏处理框等,我看到“电子邮件待处理”,“处理订单”屏幕,两者都使用处理页面概念并显示对话框,请问您建议的方式像 Acumatica 在那些屏幕中那样实现吗?
    猜你喜欢
    • 1970-01-01
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多