如何自动刷新SO订单输入页面 [英] How to automatically refresh the SO Order Entry Page

查看:126
本文介绍了如何自动刷新SO订单输入页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个SO订单输入自定义项,它在操作电子邮件销售订单/报价期间为每个SO行都设置了一个确认复选框为true。
public CRActivityList活动;
公共PXAction通知;
[PXUIField(DisplayName = Notifications,Visible = false)]
[PXButton(ImageKey = PX.Web.UI.Sprite.Main.DataEntryF)]
受保护的虚拟IEnumerable Notification(PXAdapter适配器,
[PXString]
字符串通知CD

{
foreach(adapter.Get()中的SOOrder顺序)
{

I have an SO Order Entry customization that sets an Acknowledged checkbox true for each SO line during the Action Email Sales Order/quote. public CRActivityList Activity; public PXAction notification; [PXUIField(DisplayName = "Notifications", Visible = false)] [PXButton(ImageKey = PX.Web.UI.Sprite.Main.DataEntryF)] protected virtual IEnumerable Notification(PXAdapter adapter, [PXString] string notificationCD ) { foreach (SOOrder order in adapter.Get()) {

      var parameters = new Dictionary<string, string>();
      parameters["SOOrder.OrderType"] = order.OrderType;
      parameters["SOOrder.OrderNbr"] = order.OrderNbr;
     Activity.SendNotification(ARNotificationSource.Customer,     notificationCD, order.BranchID, parameters);

      foreach (SOLine line in PXSelect<SOLine, Where<SOLine.orderNbr,    Equal<Required<SOLine.orderNbr>>>>.Select(Base, order.OrderNbr))
      {

           SOLineExt rowExt = line.GetExtension<SOLineExt>();
           rowExt.UsrAcknowledged = true;

               Base.Transactions.Update(line);
                //Base.Transactions.View.RequestRefresh();
               // SOOrderEntry grp = PXGraph.CreateInstance<SOOrderEntry>();
               // grp.Document.Search<SOOrder.orderNbr>(order.OrderNbr,  order.OrderType);

      }
      yield return order;
    }
  }

一切正常,但我必须手动刷新页以查看复选框是否已选中。手动刷新网格不能正确显示所有检查。

Everything works as expected but I have to manually refresh the page to see that the check boxes are checked. Manually refreshing the grid does not display all checks correctly. How can I automatically refresh the page after the process so that it displays correctly?

推荐答案

通常,缓存清除对我有用,但是我如何在该过程之后自动刷新页面以使其正确显示?看不到您正在坚持更改。因此,用户无需保存就可以取消您的更改。如果要确保为用户设置并保存了标志,则应保存更改,然后可以使用缓存清除。 (但是保存也可以刷新页面)

usually a cache clear works for me but I do not see that you are persisting your change. So a user could cancel your change without saving. If you want to make sure your flag is set and saved for the user you should save the changes and then you can use the cache clear. (however save could refresh the page too)

Base.Actions.PressSave();
Base.Transactions.Cache.Clear();
Base.Transactions.Cache.ClearQueryCache();

在返回前尝试一下。

这篇关于如何自动刷新SO订单输入页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆