Using ListLookup with InspProcessing - Object reference not set

Hey there,

I’m trying this code:

bool recSelected = false;
                                
string whereClause = ""; //InspectionPending = 'true'";

DataSet dsInspProcessing = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "InspProcessingAdapter", out recSelected, true, whereClause);

if (recSelected)
{ 
                MessageBox.Show("company " + Convert.ToString(dsInspProcessing.Tables[0].Rows[0]["Company"]));

}

And when I execute it and click the Search button I get this:

When I turn the dialog off (which is what I really want) like this:

bool recSelected = false;
                                
string whereClause = ""; //InspectionPending = 'true'";

DataSet dsInspProcessing = Ice.UI.FormFunctions.SearchFunctions.listLookup(oTrans, "InspProcessingAdapter", out recSelected,   *false*  , whereClause);

if (recSelected)
{ 
                MessageBox.Show("company " + Convert.ToString(dsInspProcessing.Tables[0].Rows[0]["Company"]));

}

I get this:

image

I’ve gotten this with another listlookup with a bad whereclause, but an empty one here. Maybe that’s the problem, but “TrnTyp = ‘I’” gives me the same thing.

Adapters:

image

Experience?

Thanks,

Joe