Failure to invoke in UserFileAdapter E10

Hi,
I just can’t see it. Here’s some code below to get the user ID (works fine), find the user’s record to get the security group list (doesn’t work fine), then set some fields read-only if the user isn’t in a certain group.

The line killing me is in this:

DataSet dsUser = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, “UserFileAdapter”, out recSelected, false, whereClause);

When this line executes I get this message:

The process caller failed to invoke method InvokeSearch in Ice.Lib.Searches.EpiSearchEngine in Ice.Lib.EpiClientLib.dll
I know I’m leaving something out.

Any comments?

Thanks,

Joe

Here’s the code:

private void PartForm_Load(object sender, EventArgs args)
{

	Ice.Core.Session session = (Ice.Core.Session)PartForm.Session;
	MessageBox.Show("session = " + session.UserID);
	bool recSelected = false;
	string secGroup = "";
	bool secManager = false;
	string whereClause = "UserID = '" + session.UserID + "'";
	MessageBox.Show("whereClause = " + whereClause);

DataSet dsUser = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, “UserFileAdapter”, out recSelected, false, whereClause);
if (recSelected)
{
secGroup = Convert.ToString(dsUser.Tables[0].Rows[0][“GroupList”]);
secManager = Convert.ToBoolean(dsUser.Tables[0].Rows[0][“SecurityMgr”]);
MessageBox.Show("user groups = " + secGroup);
}

	if (("~" + secGroup + "~").Contains("~" + "ENGA01" + "~") || secManager)
	
		{
			foreach (Control sPlate in grpSerialPlate.Controls)
				{
					sPlate.Enabled = false;
				}
			foreach (Control sPlateImage in grpSPImages.Controls)
				{
					sPlateImage.Enabled = false;
				}
		}
}

Doh. It’s DcdUserID, not UserID. Sigh.