Posts

Showing posts from February, 2021

Dynamic dataview creation

 public static void AddViewToGraph(PXGraph graph, Type dacClass, Type dacClas2 = null)         {             var viewName = "_AppendGR" + graph.GetType().FullName + "_" + dacClass.FullName;             if (!graph.Views.ContainsKey(viewName))             {                 var command = BqlCommand.CreateInstance(typeof(Select<>), dacClass);                 var newView = new PXView(graph, true, command);                 graph.Views.Add(viewName, newView);                 graph.Views.Caches.Add(dacClass);                 if (dacClas2 != null)                 {                     //comma...