Hello! I was hoping someone has example code of a search that loads parent records within a UDScreen (custom screen). Unfortunately for me, using the search button that comes in the base screen is not possible. I need to build a search that returns multiple keys, not just Key1. I tried using the search wizard that gave me:
bool recSelected;
string whereClause = string.Empty;
System.Data.DataSet dsUD11Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD11Adapter", out recSelected, true, whereClause);
if (recSelected)
{
System.Data.DataRow adapterRow = dsUD11Adapter.Tables[0].Rows[0];
// Map Search Fields to Application Fields
EpiDataView edvUD11 = ((EpiDataView)(this.oTrans.EpiDataViews["UD11"]));
System.Data.DataRow edvUD11Row = edvUD11.CurrentDataRow;
if ((edvUD11Row != null))
{
edvUD11Row.BeginEdit();
edvUD11Row["Key2"] = adapterRow["Key2"];
edvUD11Row["Key1"] = adapterRow["Key1"];
edvUD11Row["Key3"] = adapterRow["Key3"];
edvUD11Row.EndEdit();
}
}
But as it uses .CurrentDataRow it never loads anything because there is no row when you’re trying to load the record itself. I appreciate any feedback! Take care!