public static void PostOrder(SOPostShipmentFilter filter, List <SOOrder> list) { SOOrderEntry docgraph = PXGraph.CreateInstance <SOOrderEntry>(); DocumentList <INRegister> created = new DocumentList <INRegister>(docgraph); INIssueEntry ie = PXGraph.CreateInstance <INIssueEntry>(); ie.FieldVerifying.AddHandler <INTran.projectID>((PXCache sender, PXFieldVerifyingEventArgs e) => { e.Cancel = true; }); ie.FieldVerifying.AddHandler <INTran.taskID>((PXCache sender, PXFieldVerifyingEventArgs e) => { e.Cancel = true; }); foreach (SOOrder order in list) { docgraph.PostOrder(ie, order, created); } }
public virtual void SOPostShipmentFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e) { SOPostShipmentFilter filter = e.Row as SOPostShipmentFilter; PXProcessingStep[] targets = PXAutomation.GetProcessingSteps(this); if (targets.Length > 0) { Dictionary <string, object> parameters = Filter.Cache.ToDictionary(filter); Orders.SetProcessTarget(targets[0].GraphName, targets[0].Name, targets[0].Actions[0].Name, targets[0].Actions[0].Menus[0], null, parameters); } else { Orders.SetProcessDelegate(delegate(List <SOOrder> list) { PostOrder(filter, list); }); } }