protected void edValue_InternalFieldsNeeded(object sender, PXCallBackEventArgs e) { List <string> res = new List <string>(); SYExportMaint graph = (SYExportMaint)this.ds.DataGraph; if (graph.Mappings.Current == null || string.IsNullOrEmpty(graph.Mappings.Current.ScreenID)) { return; } PXSiteMap.ScreenInfo info = ScreenUtils.GetScreenInfo(graph.Mappings.Current.ScreenID); Dictionary <string, bool> addedViews = new Dictionary <string, bool>(); foreach (string viewname in info.Containers.Keys) { int index = viewname.IndexOf(": "); if (index != -1 && addedViews.ContainsKey(viewname.Substring(0, index))) { continue; } addedViews.Add(viewname, true); foreach (PX.Data.Description.FieldInfo field in info.Containers[viewname].Fields) { res.Add("[" + viewname + "." + field.FieldName + "]"); } } e.Result = string.Join(";", res.ToArray()); }
protected void edValue_InternalFieldsNeeded(object sender, PXCallBackEventArgs e) { var graph = (SYImportMaint)this.ds.DataGraph; if (graph.Mappings.Current == null || string.IsNullOrEmpty(graph.Mappings.Current.ScreenID)) { return; } var info = ScreenUtils.GetScreenInfo(graph.Mappings.Current.ScreenID); var res = info.Containers.Select( c => new { container = c, viewName = c.Key.Split(new[] { ": " }, StringSplitOptions.None)[0] }) .SelectMany(t => info.Containers[t.container.Key].Fields, (t, field) => "[" + t.viewName + "." + field.FieldName + "]").Distinct(); e.Result = string.Join(";", res.ToArray()); }
public SOAmazonSetupMaint() { SOOrderEntry soGraph = PXGraph.CreateInstance <SOOrderEntry>(); m_screenInfo = ScreenUtils.GetScreenInfo(SOConstants.ScreenID); }