Add two search filters on Material Queue Manager with Customer ID and Order ID

Due to the heavy default data load (search result on the data grid) on the Material Queue Manager screen, we’d like to offer more search criteria (Customer ID, Order ID) in the Material Queue Manager so that a user has an ability to retrieve the target order records quicker based on customer ID and order number. This will improve the distribution process and increase the system response time to users.

The screen is available on the menu “Material Management ->Advanced Material Management ->General Operations->Material Queue Manager.

image

SOLUTION APPLIED SO FAR BUT NO RESULT

• Added 2 Textbox “Cust ID” and “Order No”
• Added custom Button “Retrieve” (Native “Retrieve” button is hidden)
• When user clicks on the “Retrieve” button, results will be shown based on selection criteria along with newly added search criteria fields (Customer ID and Order No), It will populate the results as per our expectation but there are certain issues which are mentioned below.
• Behavior
Step #1: Enter the order number 1012248
Step #2: Only the matched records based on “Cust ID” and “Order No” returned and bound them with the result data grid. (It returned only the selected records from the database and bound to data grid)

• To achieve this, I have used custom BAQ to retrieve records from the database and displayed in the data grid but doing so we are losing our native Epicor behavior, controls and events and also getting unwanted error messages like “Object reference not set to an instance of an object.” And “Key not found: 'Quantity' Parameter name: key”. Even we couldn’t get right-click options.

OR, when i exist material queue manager then its gining below error
image

• Epicor itself doesn’t allow us to play with the result data grid and the controls.
• Even BPM method directive also not accepting any additional reach criteria apart from its native search criteria

delimitedFilterString = "[OrderNum]1012428~"

Objectives of this task
The object of adding two fields are to limit the total records when retrieving the data from the material queue. Not pulling all of the records in the material queue and filter them.

Currently, we have over 30,000 records in the material queue in the production and it takes time (a couple of minutes) to retrieve them all and then filter them from all records.

BELOW SOLUTION IS WORKING BUT IS NOT AS EXPECTED
o Step #1: Enter the order number 1012248
o Step #2: All records in the material queue manager are returned (6822 records) in the datasource
o Step #3: And then it filters the records based on the customer id and order number.

it would be much appreciated if you could respond

can you not invoke getrows method and bind the result?

When you click the “Retrieve” button in Material Queue Manager, it fires “Erp.MaterialQueue.GetRowsCustom” method but it doesn’t accepting delimitedFilterString = "[OrderNum]1012428~" parameter

image

delimiter string does not have order number filter.

you could use post processing and remove all orders except the one your looking for

(or)

you may need to call material queue.getrows business object and bind data to the MQManager. see the gif. it is quick draft.

Thank you for the feedback.

you could use post-processing and remove all orders except the one your looking for
I tried this(1st) method but it doesn’t resolve our performance issue so it will not help us

AND 2nd suggestion seems good, can you please share the logic/code? how do you call the material queue.getrows method? and how do you bind data to MQManager?

I have tried below code but showing column mismatch (Columns order mismatch) (Does Not work)

private void CallMaterialQueueAdapterGetRowsMethod()
{
try
{
string whereClause = string.Empty;
Ice.Core.Session userSess = (Ice.Core.Session)MaterialQueueMgrEntryForm.Session;

		MaterialQueueAdapter adapterMaterialQueue = new MaterialQueueAdapter(this.oTrans);
		adapterMaterialQueue.BOConnect();
		
		Ice.Lib.Searches.SearchOptions opts = new SearchOptions(SearchMode.AutoSearch); 
		opts.DataSetMode = DataSetMode.RowsDataSet; 
		
		whereClause = string.Format("Company = '{0}' AND OrderNum = {1}", Convert.ToString(userSess.CompanyID), txtOrderNo.Text.Trim());
				
		opts.NamedSearch.WhereClauses.Add("MtlQueue",whereClause);
		bool morePages = false;
		System.Data.DataSet dsMaterialQueue = adapterMaterialQueue.GetRows(opts, out morePages);
	Gridmtl.DataSource = dsMaterialQueue;

		adapterMaterialQueue.Dispose();

	} catch (System.Exception ex)
	{
		ExceptionBox.Show(ex);
	}
}

bind mtlqueue table from adapter.

adapterMaterialQueue.MaterialQueueData.MtlQueue

Hello, i have tried what you suggested but doesn’t success.

Can you please provide more details with code?

see below example, didn’t working

// Call Adapter method
System.Data.DataSet dsMaterialQueue = adapterMaterialQueue.GetRows(opts, out morePages);
Gridmtl.DataSource = adapterMaterialQueue.MaterialQueueData.MtlQueue;

Hi priteshe, could you able to resolve you issue?