How to open a screen as popup from Site Map location

血红的双手。 提交于 2019-12-25 08:15:54

问题


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?


回答1:


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


来源:https://stackoverflow.com/questions/41448961/how-to-open-a-screen-as-popup-from-site-map-location

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!