How to open a screen as popup from Site Map locati

2019-09-11 08:22发布

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?

标签: acumatica
1条回答
狗以群分
2楼-- · 2019-09-11 08:40

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);

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 };
查看更多
登录 后发表回答