如何从站点地图位置打开屏幕作为弹出窗口 [英] How to open a screen as popup from Site Map location

查看:101
本文介绍了如何从站点地图位置打开屏幕作为弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法打开自定义屏幕(如站点地图中Acumatica菜单中所示)作为弹出窗口(而不是新选项卡),以使其不占用现有浏览器?

Is there any way to open a custom screen, as placed in the Acumatica menu in the Site map, as a popup (not a new tab) so that it doesn't occupy the existing browser?

我试过使用它,效果很好:

I've tried using this, which works ok:

 var url = "http://localhost/AcumaticaDB2562/?ScreenId=AC302000&&OpenSourceName=Bills+and+Adjustments&DataID=" + apinvoice.RefNbr;
            throw new PXRedirectToUrlException(url, "Open Source")
            {
                Mode = PXBaseRedirectException.WindowMode.NewWindow
            };

问题是,我不想显示左侧菜单。我只希望屏幕没有任何导航。

The problem is, I don't want the lefthand menu to show up. I just want the screen without any navigation. Is this possible?

推荐答案

我喜欢使用PXRedirectHelper.TryRedirect来调用其他图形。 WindowMode告诉框架如何打开图形。对于您的问题,您将需要使用WindowMode.NewWindow,如以下示例所示:

I like to use PXRedirectHelper.TryRedirect for calling other graphs. The WindowMode tells the framework how to open the graph. For your question, you will want to use WindowMode.NewWindow as shown in the example below:

var graph = PXGraph.CreateInstance<MyGraph>();
PXRedirectHelper.TryRedirect(graph, PXRedirectHelper.WindowMode.NewWindow);

WindowMode的枚举值为:InLineWindow,New,NewWindow,PopUp,Same。

The enum values for WindowMode are: InLineWindow, New, NewWindow, PopUp, Same.

或者您可以执行以下操作...

Alternatively you could do something like this...

throw new PXRedirectRequiredException(graph, true, string.Empty) { Mode = PXBaseRedirectException.WindowMode.NewWindow };

这篇关于如何从站点地图位置打开屏幕作为弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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