. net lists not filtering based on company

Hoping someone can help. I appear to be having some strange behavior in my system and I am not sure why.

Lists that were created using .net are showing all records in the system versus just the records for the company record I am on.

The strange thing is, they worked on Tuesday of this week (01/06). There are two other tabs in the company record

that were created in the same fashion as the one I was currently working with. Therefore, I took a look at those to see if I inadvertently changed something on my current tab that might be causing the tab not to function properly. I went over to another tab to confirm that only the records for that company were displaying. To my surprise, all the records in the system were displaying on the list. I popped over to the third tab....again all records not just that companies records.

I am stumped. All three of these tabs worked on Tuesday and displayed the correct records. Each of the three tabs were created from secondary entities. These entities are named CHSapplication, Lease, CHStransactions. Below is the code used for each page in the .net project file.

CHSapplication--

using System;

using System.Collections.Generic;

using System.Text;

using Sage.CRM.WebObject;

using Sage.CRM.Blocks;

using Sage.CRM.Controls;

using Sage.CRM.Data;

using Sage.CRM.HTML;

using Sage.CRM.Utils;

using Sage.CRM.Graphics;

namespace CHSapplication.DataPages

{

public class CHSapplicationListPage : ListPage

{

//Constructor needs EntityName, ListName, IdField, FilterByField, FilterContext and ScreenName

public CHSapplicationListPage()

: base("CHSapplication", "CHSappList", "CHSapplicationFilterBox")

{

int iDomKey = Keys[(int)Sage.KeyList.DominantKey];

switch (iDomKey)

{

case 1:

FilterByField = "app_companyid";

FilterByContextId = (int)Sage.KeyList.CompanyId;

break;

}

}

public override void BuildContents()

{

try

{

/* Add your code here */

base.BuildContents();

}

catch (Exception error)

{

this.AddError(error.Message);

}

}

}

}

Lease --

using System.Collections.Generic;

using System.Text;

using Sage.CRM.WebObject;

using Sage.CRM.Blocks;

using Sage.CRM.Controls;

using Sage.CRM.Data;

using Sage.CRM.HTML;

using Sage.CRM.Utils;

using Sage.CRM.Graphics;

namespace CHSLease.DataPages

{

public class LeaseListPage : ListPage

{

/* Constructor needs EntityName, ListName, IdField, FilterByField, FilterContext and ScreenName

*/

public LeaseListPage()

//base ("EntityName", "ListName", "FilterBoxName")

:base ("Lease", "LeaseList", "LeaseFilterBox")

{

int iDomKey = Keys[(int)Sage.KeyList.DominantKey];

switch (iDomKey)

{

case 1:

FilterByField = "lease_companyid";

FilterByContextId = (int)Sage.KeyList.CompanyId;

break;

//case 2:

//FilterByField = "lease_personid";

//FilterByContextId = (int)Sage.KeyList.PersonId;

// break;

//case 4:

//FilterByField = "lease_userid";

//FilterByContextId = (int)Sage.KeyList.UserId;

//break;

//case 5:

//FilterByField = "lease_channelid";