protected void edValue_InternalFieldsNeeded(object sender, PXCallBackEventArgs e)
    {
        List <string>         res   = new List <string>();
        SYImportProcessSingle graph = (SYImportProcessSingle)this.ds.DataGraph;

        if (graph.MappingsSingle.Current == null || string.IsNullOrEmpty(graph.MappingsSingle.Current.ScreenID))
        {
            return;
        }

        PXSiteMap.ScreenInfo      info       = ScreenUtils.GetScreenInfo(graph.MappingsSingle.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 form_DataBound(object sender, EventArgs e)
    {
        SYImportProcessSingle graph = this.ds.DataGraph as SYImportProcessSingle;

        if (graph.IsSiteMapAltered)
        {
            this.ds.CallbackResultArg = "RefreshSitemap";
        }
    }
        public virtual IEnumerable GoToScreen(PXAdapter adapter)
        {
            WZTask task = PXSelect <WZTask, Where <WZTask.taskID, Equal <Current <WZTask.taskID> > > > .Select(this);

            if (task == null)
            {
                return(adapter.Get());
            }

            if (task.ScreenID != null)
            {
                PXSiteMapNode node = PXSiteMap.Provider.FindSiteMapNodeByScreenID(task.ScreenID);
                if (task.ImportScenarioID != null)
                {
                    SYMappingActive importScenario =
                        PXSelect
                        <SYMappingActive, Where <SYMappingActive.mappingID, Equal <Required <SYMapping.mappingID> > >
                        >
                        .Select(this, task.ImportScenarioID);

                    if (importScenario != null)
                    {
                        SYImportProcessSingle importGraph = CreateInstance <SYImportProcessSingle>();

                        importGraph.MappingsSingle.Current = (SYMappingActive)importScenario;
                        throw new PXRedirectRequiredException(importGraph, true, task.Name);
                    }
                }
                else
                {
                    if (node.GraphType != null)
                    {
                        Type t = GraphHelper.GetType(node.GraphType);
                        if (t == typeof(FeaturesMaint))
                        {
                            FeaturesMaint featuresMaint = PXGraph.CreateInstance <FeaturesMaint>();
                            featuresMaint.Features.Current = featuresMaint.Features.Select();
                            featuresMaint.ActivationBehaviour.Cache.SetValueExt <AfterActivation.refresh>(featuresMaint.ActivationBehaviour.Current, false);

                            PXRedirectHelper.TryRedirect(featuresMaint, PXRedirectHelper.WindowMode.InlineWindow);
                        }
                        PXGraph tgraph = CreateInstance(t);
                        throw new PXRedirectRequiredException(tgraph, true, task.Name)
                              {
                                  Mode = PXBaseRedirectException.WindowMode.NewWindow
                              };
                    }

                    throw new PXRedirectToUrlException(node.Url, PXBaseRedirectException.WindowMode.NewWindow, task.Name);
                }
            }
            return(adapter.Get());
        }