# Key not found: 'StatusCode' - Customization for TaskList

**URL:** <https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219>\
**Category:** Epicor ERP 10\
**Created:** [July 22, 2018, 2:23am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219 "2018-07-22T02:23:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 22, 2018, 2:23am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/1 "2018-07-22T02:23:28Z")

</div>

I am not sure what this error message mean. I customized the TaskList screen with a BAQ DV. See code below: But everytime the TaskList is loaded the following error is displayed, but the BAQ DV does run and work.

Application Error

Exception caught in: Infragistics4.Shared.v12.2

# Error Detail

Message: Key not found: ‘StatusCode’  
Parameter name: key  
Program: Infragistics4.Shared.v12.2.dll  
Method: GetItem

# Client Stack Trace

at Infragistics.Shared.KeyedSubObjectsCollectionBase.GetItem(String key)  
at Infragistics.Win.UltraWinGrid.ColumnsCollection.get\_Item(String key)  
at Erp.UI.App.TaskListEntry.TaskListForm.SetupCombos()  
at Erp.UI.App.TaskListEntry.TaskListForm.SetDisplay()  
at Ice.Lib.Framework.EpiBaseForm.setupUIElements()

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 22, 2018, 2:39am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/2 "2018-07-22T02:39:08Z")

</div>

public void CreateTaskListBAQView()  
{

```
	// Initialize the BAQDataView by giving it the BAQ name that will be used.
	baqViewTaskList = new BAQDataView("MGATaskList");

	// This will add the BAQDataView to the form, so we can bind it to the grid. The DataView will be called "CustTrackershipment".  
	oTrans.Add("MGATaskListView",baqViewTaskList);

    string pubBinding = "Task.SalesRepCode";  
	IPublisher pub = oTrans.GetPublisher(pubBinding); // if the publisher exist, then a publisher name will be returned. 

	// The following code is only needed if the filter field "Customer.CustID" have NOT been published. In this case I am using a standard column. 
    // Most likely the CustID is published. If this was an uncommon column like a UD field, I would need to check and publish the field. The code in 
	// place will check for this condition. The purpose of the publisher, is everytime the Customer.CustID is changed, the new value becomes available
	// and the BAQ DataView is filtered accordingly. The BAQ DataView will have all the customers in it.  	
			
	if(pub==null) // if no publisher
	{
		//MessageBox.Show("if not null".ToString());
		oTrans.PublishColumnChange(pubBinding, "MyCustomPublish1"); // publish it
		pub = oTrans.GetPublisher(pubBinding); // get a hold of that publisher 
	}
    
	// MessageBox.Show("before if pub != null".ToString());
	if(pub !=null) // if we have that publisher available then we want to subscribe (filter) the BAQDataView to that publisher
	// Filter on the Customer_CustNum column in the custom BAQDataView. 
	baqViewTaskList.SubscribeToPublisher(pub.PublishName, "Task_SalesRepCode"); // this is the actual column name from the BAQ

```

The warning message occurs when the following line executes:  
baqViewTaskList.SubscribeToPublisher(pub.PublishName, “Task\_SalesRepCode”);

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 22, 2018, 2:43am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/3 "2018-07-22T02:43:51Z")

</div>

![TaskList3](https://epiusers.help/uploads/default/original/2X/6/613c646d74b944807e03731bee5eb526fdb0f15c.png)

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [July 22, 2018, 3:45am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/4 "2018-07-22T03:45:34Z")

</div>

The problem appears to happen in the setup of combos. More specifically, it appears it’s looking to the ultragrid columns to find data that doesn’t exist. I’d check my order of operations first.

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 22, 2018, 3:47am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/5 "2018-07-22T03:47:46Z")

</div>

This is odd because I used the Base TaskList to make sure no other customization exist.

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 22, 2018, 11:51pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/6 "2018-07-22T23:51:42Z")

</div>

I check and the BAQDV does has a column call Task\_StatusCode… The field is listed under the

 ![TaskList4](https://epiusers.help/uploads/default/original/2X/f/f997d488c7df459b36f3247c4bf33c0b56f1f279.png)

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 23, 2018, 12:18am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/7 "2018-07-23T00:18:18Z")

</div>

It looks like if I change the TaskList grid binding back from the BAQtask DV to Task default DV the error goes away. So is there a way to bind the BAQtask DV to the grid after the screen initialize? or is there a simpler solution ?

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [July 23, 2018, 2:10pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/8 "2018-07-23T14:10:49Z")

</div>

Where are you creating your BAQView - Initialization or FormLoad?

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 23, 2018, 11:59pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/9 "2018-07-23T23:59:12Z")

</div>

In the form Initialization

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 24, 2018, 12:05am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/10 "2018-07-24T00:05:17Z")

</div>

if I attempt to create the BAQview from the Load event, I get the following error:

Application Error

Exception caught in: Ice.Lib.EpiClientLib

# Error Detail

Message: Control ‘eugTaskList’ of type EpiUltraGridWithEmbeddedControl has an invalid binding to view MGATaskListView.  
Program: Ice.Lib.EpiClientLib.dll  
Method: EventSetup

# Client Stack Trace

at Ice.Lib.Framework.EpiUltraGrid.EventSetup()  
at Ice.Lib.Framework.EpiUltraGridWithEmbeddedControl.EventSetup()  
at Ice.Lib.Framework.EpiUltraGrid.set\_EpiTransaction(IEpiTransaction value)  
at Ice.Lib.Framework.EpiUIUtils.BindNConfigureControls()

This error makes sense, because the MGATaskListView has been binded to the TaskList grid.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [July 24, 2018, 1:33am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/11 "2018-07-24T01:33:10Z")

</div>

In the SetupCombos() func:

```cs
this.mainDockPanel1.taskListPanel1.eugTaskList.DisplayLayout.Bands[0].Columns["StatusCode"].ValueList = this.mainDockPanel1.taskListPanel1.cmbTaskStatus;

```

Are you messing with the eugTaskList grid? Even if you only changed the banding, it could wreck this code,

Unrelated, but this is interesting…it goes on forerver:  
 ![image](https://epiusers.help/uploads/default/original/2X/8/80e649297679555d0e12204cbf038ba771f56e39.png)

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 24, 2018, 1:55am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/12 "2018-07-24T01:55:20Z")

</div>

I am only changing, the TaskList grid binding property from Task DV to MGATaskListView BAQ DV. The MGATaskListView is created from the form initialization function.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [July 24, 2018, 3:19am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/13 "2018-07-24T03:19:27Z")

</div>

Thats the problem. You no longer have the “StatusCode” column…you then have “Task\_StatusCode”. Perhaps modify the underlying table column name in code if possible?

---

<div class="post-metadata">

**Author:** ![asmar](https://www.epiusers.help/user_avatar/www.epiusers.help/asmar/32/4119_2.png) [@asmar](https://www.epiusers.help/u/asmar)\
**Post date:** [July 27, 2018, 12:02am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/14 "2018-07-27T00:02:46Z")

</div>

Thank you. I created an custom grid a left the original. The error no longer occurs.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [July 27, 2018, 12:07am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/15 "2018-07-27T00:07:03Z")

</div>

Glad to help you get the solution.

---

<div class="post-metadata">

**Author:** ![nalemanh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@nalemanh](https://www.epiusers.help/u/nalemanh)\
**Post date:** [April 7, 2021, 12:41pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/16 "2021-04-07T12:41:11Z")

</div>

> [@Chris\_Conn](#):
>
> Thats the problem. You no longer have the “StatusCode” column…you then have “Task\_StatusCode”. Perhaps modify the underlying table column name in code if possible?

Can you explain this a little more, please?.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [April 7, 2021, 1:52pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/17 "2021-04-07T13:52:05Z")

</div>

In the initial problem, the user was using a control that required a specific field (StatusCode) - instead he used a BAQ to feed a dataview that he bound to the control. While technically it contained the field, due to baq naming, it was Task\_StatusCode (as opposed to StatusCode).

My thought was that he could change the column name to make it do what he wanted. It’s a little more complicated than that because everytime the BAQ runs, it will dump the original name. So you would need to put some events on the table to catch and change it everytime.

In general, you can do:

```auto
//if needed, you get datatable from view
var dt = edv.dataView.Table;
dt.Columns["EXCELCOLUMNS"].ColumnName = "COLUMN_NAME";                        
 dt.AcceptChanges();

```

---

<div class="post-metadata">

**Author:** ![Egkk](https://www.epiusers.help/user_avatar/www.epiusers.help/egkk/32/38345_2.png) [@Egkk](https://www.epiusers.help/u/Egkk)\
**Post date:** [September 5, 2024, 2:34pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/18 "2024-09-05T14:34:42Z")

</div>

I am facing the same problem may i know exactly how should use the code to change the column name?

I am changing the AR invoice \> get shipment \> view not invoiced packing slip to a baqview.

I need to change to CustID.  
The current column name is the baq column name?

 ![20240905_223002](https://www.epiusers.help/uploads/default/original/3X/7/4/745ef7bbe72ecec855b2396cf2340649b31ab2de.jpeg)

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [September 5, 2024, 2:42pm UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/19 "2024-09-05T14:42:12Z")

</div>

> [@Egkk](#):
>
> I am changing the AR invoice \> get shipment \> view not invoiced packing slip to a baqview.

What is different with the standard vs your baqview?

There might be a simpler way to do this in a bpm. That way you would be Kinetic ready as well.

---

<div class="post-metadata">

**Author:** ![Egkk](https://www.epiusers.help/user_avatar/www.epiusers.help/egkk/32/38345_2.png) [@Egkk](https://www.epiusers.help/u/Egkk)\
**Post date:** [September 6, 2024, 2:50am UTC](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219/20 "2024-09-06T02:50:28Z")

</div>

Hi Kevin,

Actually minimally i will need one UD field from Sales order header table to be added into the standard grid.

I am not really a software developer hence i find baqview solution the easiest to adopt but face problem while trying to implement it.

If you are able to share exactly how i can use BPM i will not mind to give it a try. Thanks.

[Next page](https://www.epiusers.help/t/key-not-found-statuscode-customization-for-tasklist/46219.md?page=2)
