Add ordernum field to filter picked orders grid

What’s the best way to filter picked orders to a specific order number?

I’ve added an OrderNumber box to the Picked Orders form (Customer Shipment Entry > Actions > F1 Picked Orders), but not sure how to go about filtering out other orders. We’ve added a barcode to the MQR. Our plan was to have the folks in shipping scan this from the MQR into the picked order form (and not have to type it), and just show the related order.

I did a trace, and see the PickedOrders BO calls the GetRows method. Would you filter it out similar to hiding the ShipVia (with the GetList method)? How do you get the order number from the text box on the form a BPM’s variable? Does it need a button, or tab will do it?

Trace:

<tracePacket>
  <businessObject>Erp.Proxy.BO.PickedOrdersImpl</businessObject>
  <methodName>GetRows</methodName>
  <appServerUri>net.tcp://<MASKED>/Pilot/</appServerUri>
  <returnType>Erp.Tablesets.PickedOrdersTableset</returnType>
  <localTime>4/12/2021 17:01:33:7776675 PM</localTime>
  <threadID>1</threadID>
  <correlationId>727347ef-047a-4154-be21-36ba0881c666</correlationId>
  <executionTime total="603" roundTrip="586" channel="0" bpm="0" bpmDataForm="0" other="17" />
  <retries>0</retries>
  <parameters>
    <parameter name="whereClausePickedOrders" type="System.String"><![CDATA[]]></parameter>
    <parameter name="whereClauseMtlQueue" type="System.String"><![CDATA[]]></parameter>
    <parameter name="pageSize" type="System.Int32"><![CDATA[0]]></parameter>the PickedOrders 
    <parameter name="absolutePage" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="morePages" type="System.Boolean"><![CDATA[False]]></parameter>
  </parameters>
  <serverTrace>
    <Op Utc="2021-04-12T21:01:33.8802504Z" act="Erp:BO:PickedOrders/PickedOrdersSvcContract/GetRows" correlationId="727347ef-047a-4154-be21-36ba0881c666" dur="562.7036" cli="..." usr="<MASKED>" machine="<MASKED>" pid="1532" tid="178" xmlns="" />
  </serverTrace>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.MaterialQueueImpl</businessObject>
  <methodName>GetRows</methodName>
  <appServerUri>net.tcp://<MASKED>/Pilot/</appServerUri>
  <returnType>Erp.Tablesets.MaterialQueueTableset</returnType>
  <localTime>4/12/2021 17:01:34:4188379 PM</localTime>
  <threadID>1</threadID>
  <correlationId>f5beb755-eb10-435b-8e6e-ab2c8ea0dbb0</correlationId>
  <executionTime total="289" roundTrip="263" channel="0" bpm="0" bpmDataForm="0" other="26" />
  <retries>0</retries>
  <parameters>
    <parameter name="whereClauseMtlQueue" type="System.String"><![CDATA[(TranType = 'mfg-shp' or TranType = 'stk-shp' or TranType = 'Kit-shp' or TranType = 'cmp-shp') BY PartNum]]></parameter>
    <parameter name="pageSize" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="absolutePage" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="morePages" type="System.Boolean"><![CDATA[False]]></parameter>
  </parameters>
  <serverTrace>
    <Op Utc="2021-04-12T21:01:34.5202907Z" act="Erp:BO:MaterialQueue/MaterialQueueSvcContract/GetRows" correlationId="f5beb755-eb10-435b-8e6e-ab2c8ea0dbb0" dur="228.6089" cli="..." usr="<MASKED>" machine="<MASKED>" pid="1532" tid="211" xmlns="" />
  </serverTrace>
</tracePacket>

<tracePacket>
  <businessObject>Erp.Proxy.BO.CustShipImpl</businessObject>
  <methodName>GetAvailTranDocTypes</methodName>
  <appServerUri>net.tcp://<MASKED>/Pilot/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>4/12/2021 17:01:34:7685413 PM</localTime>
  <threadID>1</threadID>
  <correlationId>fb6efcf2-d21c-451b-b575-673fac1b0733</correlationId>
  <executionTime total="15" roundTrip="13" channel="0" bpm="0" bpmDataForm="0" other="2" />
  <retries>0</retries>
  <parameters>
    <parameter name="AvailTranDocTypes" type="System.String"><![CDATA[]]></parameter>
  </parameters>
  <serverTrace>
    <Op Utc="2021-04-12T21:01:34.8703137Z" act="Erp:BO:CustShip/CustShipSvcContract/GetAvailTranDocTypes" correlationId="fb6efcf2-d21c-451b-b575-673fac1b0733" dur="2.585" cli="..." usr="<MASKED>" machine="<MASKED>" pid="1532" tid="211" xmlns="" />
  </serverTrace>
</tracePacket>

<tracePacket>
  <businessObject>Ice.Proxy.BO.GenXDataImpl</businessObject>
  <methodName>GetByID</methodName>
  <appServerUri>net.tcp://<MASKED>/Pilot/</appServerUri>
  <returnType>Ice.Tablesets.GenXDataTableset</returnType>
  <localTime>4/12/2021 17:01:34:8443157 PM</localTime>
  <threadID>1</threadID>
  <correlationId>c73eb16f-7f4d-4c13-8ef5-8c48f5fc9b99</correlationId>
  <executionTime total="16" roundTrip="15" channel="0" bpm="0" bpmDataForm="0" other="1" />
  <retries>0</retries>
  <parameters>
    <parameter name="company" type="System.String"><![CDATA[<MASKED>]]></parameter>
    <parameter name="productID" type="System.String"><![CDATA[EP]]></parameter>
    <parameter name="typeCode" type="System.String"><![CDATA[Customization]]></parameter>
    <parameter name="cgCCode" type="System.String"><![CDATA[]]></parameter>
    <parameter name="key1" type="System.String"><![CDATA[<MASKED>_CustShipAutoShip_CBS]]></parameter>
    <parameter name="key2" type="System.String"><![CDATA[App.CustShipEntry.PickedOrdersForm]]></parameter>
    <parameter name="key3" type="System.String"><![CDATA[]]></parameter>
  </parameters>
  <serverTrace>
    <Op Utc="2021-04-12T21:01:34.9443181Z" act="Ice:BO:GenXData/GenXDataSvcContract/GetByID" correlationId="c73eb16f-7f4d-4c13-8ef5-8c48f5fc9b99" dur="2.9228" cli="132.29.200.97:60308" usr="<MASKED>" machine="<MASKED>" pid="1532" tid="178" xmlns="" />
  </serverTrace>
</tracePacket>
2 Likes

How does the Staging Warehouse and Bin filter work? Trace doesn’t show anything other than a GetList to populate the dropdown, so I’m thinking it filters the already loaded PickedOrdersDataSet in the form. If I could leverage OrderNum the same way, I’d be golden!

I didn’t see anything in the base script editor for the PickedOrdersForm that seems like it filters (shrug). Not sure what to try next…

// **************************************************
// Custom code for PickedOrdersForm
// Created: 8/14/2015 12:17:35 PM
// **************************************************

extern alias Erp_Contracts_BO_CustShip;
extern alias Erp_Contracts_BO_PackOutSearch;
extern alias Erp_Contracts_BO_PickedOrders;
extern alias Erp_Contracts_BO_MaterialQueue;
extern alias Erp_Contracts_BO_Company;
extern alias Erp_Contracts_BO_Warehse;
extern alias Erp_Contracts_BO_Part;

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Erp.UI;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public class Script
{

	private Ice.Lib.Customization.CustomScriptManager csm;

	private Erp.UI.App.CustShipEntry.Transaction oTrans;

	private Erp.UI.App.CustShipEntry.PickedOrdersForm PickedOrdersForm;

	private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager baseToolbarsManager;

	private System.Data.DataTable ShipHeadAttch_Column;

	private Ice.Lib.Framework.EpiDataView AutoAttachShipHead_Row;

	private System.Data.DataTable ShipDtlAttch_Column;

	private Ice.Lib.Framework.EpiDataView AutoAttachShipDtl_Row;

	private System.Data.DataTable ShipDtl_Column;

	private Ice.Lib.Framework.EpiDataView ShipDtl_Row;

	private System.Data.DataTable ShipHeadList_Column;

	private Ice.Lib.Framework.EpiDataView ShipHeadList_Row;

	private System.Data.DataTable ShipDtlTax_Column;

	private Ice.Lib.Framework.EpiDataView ShipTax_Row;

	private System.Data.DataTable SelectedIDNumbers_Column;

	private Ice.Lib.Framework.EpiDataView IDNum_Row;

	private System.Data.DataTable Client_Column;

	private Ice.Lib.Framework.EpiDataView CallContextClientData_Row;

	private System.Data.DataTable ShipUPS_Column;

	private Ice.Lib.Framework.EpiDataView ShipUPS_Row;

	private System.Data.DataTable ShipTaxSum_Column;

	private Ice.Lib.Framework.EpiDataView ShipSummaryTax_Row;

	private System.Data.DataTable ShipHead_Column;

	private Ice.Lib.Framework.EpiDataView ShipHead_Row;

	private System.Data.DataTable LegalNumGenOpts_Column;

	private Ice.Lib.Framework.EpiDataView LegalNumGenOpts_Row;

	private System.Data.DataTable _Column;

	private Ice.Lib.Framework.EpiDataView CartonUIView_Row;

	private System.Data.DataTable PickedOrders_Column;

	private Ice.Lib.Framework.EpiDataView PickedOrders_Row;

	private Ice.Lib.Framework.EpiDataView AutoAttachSalesKits_Row;

	private System.Data.DataTable PackOut_Column;

	private Ice.Lib.Framework.EpiDataView PackOut_Row;

	private System.Data.DataTable PackoutControl_Column;

	private Ice.Lib.Framework.EpiDataView PackOutControl_Row;

	private Ice.Lib.Framework.EpiDataView Whse_Row;

	private System.Data.DataTable ShipMisc_Column;

	private Ice.Lib.Framework.EpiDataView ShipMisc_Row;

	private System.Data.DataTable BpmData_Column;

	private Ice.Lib.Framework.EpiDataView CallContextBpmData_Row;

	private Ice.Lib.Framework.EpiDataView SalesKits_Row;

	private Ice.Lib.Framework.EpiDataView TotalPerc_Row;

	private System.Data.DataTable MtlQueue_Column;

	private Ice.Lib.Framework.EpiDataView MtlQueue_Row;

	private System.Data.DataTable CartonTrkDtl_Column;

	private Ice.Lib.Framework.EpiDataView CartonTrkDtls_Row;

	private Ice.Lib.Framework.EpiDataView PackOutList_Row;

	private System.Data.DataTable ShipCOO_Column;

	private Ice.Lib.Framework.EpiDataView ShipCOO_Row;

	private Ice.Lib.Framework.EpiLabel lblOrderNum;

	private Ice.Lib.Framework.EpiLabel lblOrderNum_1d2273a1_85b6_4908_97d8_7a9e6b82b67b;

	private Ice.Lib.Framework.EpiTextBox txtorderNum;

	private Ice.Lib.Framework.EpiTextBox txtorderNum_bba41b31_f206_47a4_b0d5_748223c93fb1;

	public void InitializeGlobalVariables(Ice.Lib.Customization.CustomScriptManager csm)
	{
		this.csm = csm;
		this.oTrans = ((Erp.UI.App.CustShipEntry.Transaction)(this.csm.GetGlobalInstance("oTrans")));
		this.PickedOrdersForm = ((Erp.UI.App.CustShipEntry.PickedOrdersForm)(this.csm.GetGlobalInstance("PickedOrdersForm")));
		this.baseToolbarsManager = ((Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)(this.csm.GetGlobalInstance("baseToolbarsManager")));
		this.ShipHeadAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipHeadAttch_Column")));
		this.AutoAttachShipHead_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachShipHead_Row")));
		this.ShipDtlAttch_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipDtlAttch_Column")));
		this.AutoAttachShipDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachShipDtl_Row")));
		this.ShipDtl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipDtl_Column")));
		this.ShipDtl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipDtl_Row")));
		this.ShipHeadList_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipHeadList_Column")));
		this.ShipHeadList_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipHeadList_Row")));
		this.ShipDtlTax_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipDtlTax_Column")));
		this.ShipTax_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipTax_Row")));
		this.SelectedIDNumbers_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("SelectedIDNumbers_Column")));
		this.IDNum_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("IDNum_Row")));
		this.Client_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("Client_Column")));
		this.CallContextClientData_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CallContextClientData_Row")));
		this.ShipUPS_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipUPS_Column")));
		this.ShipUPS_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipUPS_Row")));
		this.ShipTaxSum_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipTaxSum_Column")));
		this.ShipSummaryTax_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipSummaryTax_Row")));
		this.ShipHead_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipHead_Column")));
		this.ShipHead_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipHead_Row")));
		this.LegalNumGenOpts_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("LegalNumGenOpts_Column")));
		this.LegalNumGenOpts_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("LegalNumGenOpts_Row")));
		this._Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("_Column")));
		this.CartonUIView_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CartonUIView_Row")));
		this.PickedOrders_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("PickedOrders_Column")));
		this.PickedOrders_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("PickedOrders_Row")));
		this.AutoAttachSalesKits_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("AutoAttachSalesKits_Row")));
		this.PackOut_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("PackOut_Column")));
		this.PackOut_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("PackOut_Row")));
		this.PackoutControl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("PackoutControl_Column")));
		this.PackOutControl_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("PackOutControl_Row")));
		this.Whse_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("Whse_Row")));
		this.ShipMisc_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipMisc_Column")));
		this.ShipMisc_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipMisc_Row")));
		this.BpmData_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("BpmData_Column")));
		this.CallContextBpmData_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CallContextBpmData_Row")));
		this.SalesKits_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("SalesKits_Row")));
		this.TotalPerc_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("TotalPerc_Row")));
		this.MtlQueue_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("MtlQueue_Column")));
		this.MtlQueue_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("MtlQueue_Row")));
		this.CartonTrkDtl_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("CartonTrkDtl_Column")));
		this.CartonTrkDtls_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("CartonTrkDtls_Row")));
		this.PackOutList_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("PackOutList_Row")));
		this.ShipCOO_Column = ((System.Data.DataTable)(this.csm.GetGlobalInstance("ShipCOO_Column")));
		this.ShipCOO_Row = ((Ice.Lib.Framework.EpiDataView)(this.csm.GetGlobalInstance("ShipCOO_Row")));
		Ice.Lib.Customization.PersonalizeCustomizeManager personalizeCustomizeManager = this.csm.PersonalizeCustomizeManager;
		System.Windows.Forms.Control topControl = personalizeCustomizeManager.TopControl;
		topControl.FindForm().SuspendLayout();
		// Creating custom targets.
		this.lblOrderNum = new Ice.Lib.Framework.EpiLabel();
		this.lblOrderNum_1d2273a1_85b6_4908_97d8_7a9e6b82b67b = this.lblOrderNum;
		System.Collections.Hashtable customControls = personalizeCustomizeManager.CustControlMan.CustomControlsHT;
		customControls.Add("1d2273a1-85b6-4908-97d8-7a9e6b82b67b", this.lblOrderNum);
		System.Collections.Hashtable controlsHT = personalizeCustomizeManager.ControlsHT;
		controlsHT.Add("1d2273a1-85b6-4908-97d8-7a9e6b82b67b", this.lblOrderNum);
		this.lblOrderNum.Name = "lblOrderNum";
		this.lblOrderNum.EpiGuid = "1d2273a1-85b6-4908-97d8-7a9e6b82b67b";
		this.txtorderNum = new Ice.Lib.Framework.EpiTextBox();
		this.txtorderNum_bba41b31_f206_47a4_b0d5_748223c93fb1 = this.txtorderNum;
		customControls.Add("bba41b31-f206-47a4-b0d5-748223c93fb1", this.txtorderNum);
		controlsHT.Add("bba41b31-f206-47a4-b0d5-748223c93fb1", this.txtorderNum);
		this.txtorderNum.Name = "txtorderNum";
		this.txtorderNum.EpiGuid = "bba41b31-f206-47a4-b0d5-748223c93fb1";
		// PickedOrdersForm
		Ice.Lib.Framework.EpiBaseForm local1 = ((Ice.Lib.Framework.EpiBaseForm)(personalizeCustomizeManager.ControlsHT["76ABF998-638E-430c-B4FE-E7823AA26BCB"]));
		local1.Top = 79;
		local1.Left = 452;
		local1.Width = 705;
		local1.Height = 700;
		local1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
		// pickedOrdersPanel1
		Ice.Lib.Framework.EpiBasePanel local2 = ((Ice.Lib.Framework.EpiBasePanel)(personalizeCustomizeManager.ControlsHT["f672cdf4-aa32-4edf-ad90-2be9393be666"]));
		Ice.Lib.Framework.EpiGroupBox local3 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["9a02ea91-59a8-4bb3-a0fb-930fbb2198ff"]));
		local2.Controls.SetChildIndex(local3, 0);
		System.Collections.Hashtable nativeSheets = personalizeCustomizeManager.NativeSheetsDCPsHT;
		Infragistics.Win.UltraWinDock.DockableControlPane local4 = Ice.Lib.Customization.Designers.EpiCustomSheetDesigner.GetDockableControlPane(local2, "f672cdf4-aa32-4edf-ad90-2be9393be666", nativeSheets);
		// grpFilter
		local3.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left);
		local3.Controls.Add(this.lblOrderNum);
		local3.Controls.Add(this.txtorderNum);
		local3.Controls.SetChildIndex(this.txtorderNum, 0);
		local3.Controls.SetChildIndex(this.lblOrderNum, 1);
		Ice.Lib.Framework.EpiCombo local5 = ((Ice.Lib.Framework.EpiCombo)(personalizeCustomizeManager.ControlsHT["d2f0fc0a-8347-4a7d-9231-2f9da479143e"]));
		local3.Controls.SetChildIndex(local5, 2);
		Ice.Lib.Framework.EpiLabel local6 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["11ead9c1-7583-4842-a845-7e48a234d258"]));
		local3.Controls.SetChildIndex(local6, 3);
		Ice.Lib.Framework.EpiCombo local7 = ((Ice.Lib.Framework.EpiCombo)(personalizeCustomizeManager.ControlsHT["a4204b87-f7d3-414a-b774-620886e4cae1"]));
		local3.Controls.SetChildIndex(local7, 4);
		Ice.Lib.Framework.EpiLabel local8 = ((Ice.Lib.Framework.EpiLabel)(personalizeCustomizeManager.ControlsHT["25cede37-894f-45b2-8de9-af22421aeac8"]));
		local3.Controls.SetChildIndex(local8, 5);
		// lblOrderNum
		this.lblOrderNum.Top = 17;
		this.lblOrderNum.Left = 37;
		this.lblOrderNum.Width = 46;
		this.lblOrderNum.Height = 20;
		this.lblOrderNum.Text = "Order:";
		// txtorderNum
		this.txtorderNum.Top = 17;
		this.txtorderNum.Left = 89;
		this.txtorderNum.Width = 60;
		this.txtorderNum.Height = 23;
		this.txtorderNum.Text = "";
		this.txtorderNum.EpiLabel = "lblOrderNum";
		// gbPickedOrders
		Ice.Lib.Framework.EpiGroupBox local9 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["b91f9434-2ae7-4235-b562-2db24d376c40"]));
		Ice.Lib.Framework.EpiUltraGrid local10 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["65ef8a4d-0c7d-45a7-8c65-6ff73cf71cb1"]));
		local9.Controls.SetChildIndex(local10, 0);
		// grdPickedOrders
		local10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
		local10.Top = 13;
		local10.Left = 5;
		// lblBin
		local8.Top = 17;
		local8.Left = 488;
		local8.Width = 31;
		local8.Height = 20;
		// cmbBin
		local7.Top = 17;
		local7.Left = 525;
		// lblStagingWarehouse
		local6.Top = 18;
		local6.Left = 200;
		local6.Width = 85;
		local6.Height = 20;
		local6.Text = "Staging Whse:";
		// cmbWhse
		local5.Top = 17;
		local5.Left = 288;
		// gbPickingLines
		Ice.Lib.Framework.EpiGroupBox local11 = ((Ice.Lib.Framework.EpiGroupBox)(personalizeCustomizeManager.ControlsHT["e73c9c85-c43a-4c89-a696-2eb9313ef934"]));
		Ice.Lib.Framework.EpiUltraGrid local12 = ((Ice.Lib.Framework.EpiUltraGrid)(personalizeCustomizeManager.ControlsHT["ea8f5e21-1657-40a3-adc0-636eb1ea8d3d"]));
		local11.Controls.SetChildIndex(local12, 0);
		// grdPickingLines
		local12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
		local12.Width = 933;
		local12.Height = 237;
		// Finishing control initialization.
		topControl.FindForm().ResumeLayout();
	}

	public void DestroyGlobalVariables()
	{
		this.lblOrderNum = null;
		this.lblOrderNum_1d2273a1_85b6_4908_97d8_7a9e6b82b67b = null;
		this.txtorderNum = null;
		this.txtorderNum_bba41b31_f206_47a4_b0d5_748223c93fb1 = null;
		this.csm = null;
		this.oTrans = null;
		this.PickedOrdersForm = null;
		this.baseToolbarsManager = null;
		this.ShipHeadAttch_Column = null;
		this.AutoAttachShipHead_Row = null;
		this.ShipDtlAttch_Column = null;
		this.AutoAttachShipDtl_Row = null;
		this.ShipDtl_Column = null;
		this.ShipDtl_Row = null;
		this.ShipHeadList_Column = null;
		this.ShipHeadList_Row = null;
		this.ShipDtlTax_Column = null;
		this.ShipTax_Row = null;
		this.SelectedIDNumbers_Column = null;
		this.IDNum_Row = null;
		this.Client_Column = null;
		this.CallContextClientData_Row = null;
		this.ShipUPS_Column = null;
		this.ShipUPS_Row = null;
		this.ShipTaxSum_Column = null;
		this.ShipSummaryTax_Row = null;
		this.ShipHead_Column = null;
		this.ShipHead_Row = null;
		this.LegalNumGenOpts_Column = null;
		this.LegalNumGenOpts_Row = null;
		this._Column = null;
		this.CartonUIView_Row = null;
		this.PickedOrders_Column = null;
		this.PickedOrders_Row = null;
		this.AutoAttachSalesKits_Row = null;
		this.PackOut_Column = null;
		this.PackOut_Row = null;
		this.PackoutControl_Column = null;
		this.PackOutControl_Row = null;
		this.Whse_Row = null;
		this.ShipMisc_Column = null;
		this.ShipMisc_Row = null;
		this.BpmData_Column = null;
		this.CallContextBpmData_Row = null;
		this.SalesKits_Row = null;
		this.TotalPerc_Row = null;
		this.MtlQueue_Column = null;
		this.MtlQueue_Row = null;
		this.CartonTrkDtl_Column = null;
		this.CartonTrkDtls_Row = null;
		this.PackOutList_Row = null;
		this.ShipCOO_Column = null;
		this.ShipCOO_Row = null;
	}

	public static string[] GetTranslatableStrings()
	{
		return new string[] {
				"Order:",
				"",
				"Staging Whse:"};
	}

	public static string GetStringByID(string id)
	{
		return "";
	}
	// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
	// Begin Wizard Added Module Level Variables **

	// End Wizard Added Module Level Variables **

	// Add Custom Module Level Variables Here **

	public void InitializeCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
		// Begin Wizard Added Variable Initialization

		// End Wizard Added Variable Initialization

		// Begin Wizard Added Custom Method Calls

		// End Wizard Added Custom Method Calls
	}

	public void DestroyCustomCode()
	{
		// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
		// Begin Wizard Added Object Disposal

		// End Wizard Added Object Disposal

		// Begin Custom Code Disposal

		// End Custom Code Disposal
	}
}

I’m not familiar with picked orders, but does the OdreNum field on the Cust Shipment Entry form affect what shows in the Picked Orders pop-up?

image

Calvin, it doesn’t seem to. All picked orders are loaded in. There’s also a Picked Orders handheld screen under the DC menu.

My first point attempt would be to try and set the whereClausePickedOrders field in a BPM for PickedOrders.GetRows().

Is any info from the calling form (Customer Shipment Entry) available in PickedOrders.GetRows()? You might be able to build the whereClause based on the CustNum or OrderNum, if either are available.

1 Like

Thanks! One step closer. I was able to use @timshuwy’s tip to use a RemoveAll code block in the PickedOrder.GetRows / Post BPM. I hard coded an order number, and it returned all except that one.

ttPickedOrders.RemoveAll(ttPickedOrders_Row => ttPickedOrders_Row.OrderNum != 7347106);

Do I bind the new OrderNumber text box to a new UD Field, or are there placeholders I can use and don’t need to create a UD Field?

How should I push that to the BPM? I assume you set the input somehow to a variable, and then call the variable in the code block instead of hard coding the OrderNum?

Maybe another way to look at it is to allow the BO method to fetch all the rows, then in the customization, remove them from the dataset.

It would be helpful to find out the order of the things that happen. Like when exactly the call to PickedOrders.GetRows(), with respect to the UI Form. Because I’m guessing that all the data will be retrieved long before someone gets a chance to enter something in the textbox.

I no longer have access to an E10 system, so I can’t do any tests.

Yeah, you’re right. I added the UD Field PickedOrders.FilterOrderNum_c, but the BPM runs automatically from Customer Shipment Entry > Actions > Picked Orders, so entering a order number after wouldn’t do anything.

I’d have to get it into a PRE, to pass to my POST. Could there be a pop-up from a Pre, asking to enter the order number, which I save as a parameter?

I have no idea how to intercept it in the UI. The trace doesn’t show anything meaningful, and the base form’s C# doesn’t show anything. I was hoping to duplicate the filtering method of the Staging Warehouse and Bin dropdown, but Epicor magically hides the rows as soon as you select something, without showing anything on a trace.

image

Call a BPM form from inside the Pre-Proc, and construct the whereClause based on a CallContext variable set from the BPM Form.

2 Likes

I did this for an E9 Customer last year and what I came up worked really well and there’s no Customizations nor heavy custom code:
CODE BELOW IS ABL! (but in E10 it can be accomplished with Widgets.)

-Created a BPM Form for the user to scan in the Order Number
-Method Directive (Pre) PickedOrders.GetRows calls the BPM Form to capture the Order Number, which popups up immediately when the User selects ‘Picked Orders’ from the Actions menu.
-Set the whereClausePickedOrders to this expression:

If ttCallContextBpmData.Number01 = 0 Then “” Else “Company = '” + ttCallContextClient.CurrentCompany + “’ AND Plant = '” + ttCallContextClient.CurrentPlant + "’ AND OrderNum = " + String(ttCallContextBpmData.Number01)

This effectively Filters the Results shown on screen to the user. However, now the poor user has to select each line individually, to avoid this, on the same Method, but Post we update the DataSet to have the ‘Selected’ enabled for all rows that match the Order Number:
(this was some custom code in E9, but in E10, I don’t think it would be):

for each ttPickedOrders:
if ttPickedOrders.OrderNum =ttCallContextBpmData.Number01 then assign ttPickedOrders.IsSelected = true.
end.

While the ttPickedOrder.IsSelected is set, we have to set the RowMod to ‘U’ so when the user selects ‘Create Pack’ it will actually work (I don’t understand all this, but this is what worked):
Pre Method CustShip.ProcessPickedOrder:

for each ttPickedOrders:
if ttPickedOrders.IsSelected = true and ttPickedOrders.RowMod = “” then assign ttPickedOrders.RowMod = “U”.
end.

This ended up working really smoothly and the end user experiance is nice:

  1. Select ‘Picked Orders’ from Actions Menu
  2. Scan Sales Order & Click ‘OK’
  3. Picked Lines shown and selected (any unpicked lines for the Order show in Unpicked grid). This step is good for them to confirm the Pack they are about to create and they can uncheck any lines they want to exclude for some reason.
  4. Click ‘Create Pack’
  5. Pack Created!

Give this a try, it was a simpler solution than I originally thought it would be.
(they are upgrading this year so I expect I will be upgrading the BPM’s soon)

@ckrusen and @Rick_Bird - Awesome sauce. I’m almost there. Created a BPM Dataform on Pre, asks for the order number (set to CallContextBpmData.Number01) and if >0, then enable post. Post contains the 1 line RemoveAll from @timshuwy, and it filters out the rest of the orders.

Only problem is that the CallContextBpmData.Number01 stays stuck from the last time. I tried to set it back to “” in POST, but haven’t been able to figure out the code how, and the Set Variable widget doesn’t have call context available.

This didn’t work, obviously!

ttPickedOrders.RemoveAll(ttPickedOrders_Row => ttPickedOrders_Row.OrderNum !=  callContextBpmData.Number01); 

ttPickedOrders.callContextBpmData.Number01 = ""; 

Try
callContextBpmData.Number01 = 0;

2 Likes

I had the same problem in E9 but I thought it was a weird E9 thing… though to be honest it’s probably best to always reset BPMData fields you plan to use at the beginning and end.
So yes, it had to reset the value to zero as well.
I set callContextBpmData.Number01 =0 right before calling the BPM Form.

1 Like

Yes! That worked a treat. Thanks guys.

Here’s the finished product, with baby C# code :slight_smile: Clicking 1 row selected all as well.

image

image

Pre:
image
image

Post:
image

ttPickedOrders.RemoveAll(ttPickedOrders_Row => ttPickedOrders_Row.OrderNum !=  callContextBpmData.Number01); 

callContextBpmData.Number01 = 0; 
1 Like

Version 2 will replace that numeric editor input on the BPM Form with the ability to search for the order number. :wink:

Don’t give our folks ideas! If someone wants that, I could turn on grid filters by default to get the OrderNum :slight_smile:

I’m sure someone won’t like that there’s an tab-enter to bypass it. We’ll add tab-enter to the barcode scan so that’ll save time too.

1 Like