I’m writing a customization that has a search button and populates a couple fields on the Part Plant table.
It works just fine when I test it using developer mode, but the moment I leave developer mode, clear the cache, and go back in as a user would, it gives me a “Row Modified by Another User” error upon saving. (The search works fine and the fields populated).
This happens when I go directly to the Sites tab and click the new search button, then save.
If, however, I go to the sites tab, click into ANY field (native or UD), then search, select, and save it works without the row mod error. Any ideas why this is happening and why it doesn’t happen in dev mode?
Here’s the code:
private void SearchOnUD19AdapterShowDialog()
{
// Wizard Generated Search Method
// You will need to call this method from another method in custom code
// For example, [Form]_Load or [Button]_Click
bool recSelected;
string whereClause = string.Empty;
System.Data.DataSet dsUD19Adapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "UD19Adapter", out recSelected, true, whereClause);
if (recSelected)
{
System.Data.DataRow adapterRow = dsUD19Adapter.Tables[0].Rows[0];
// Map Search Fields to Application Fields
System.Data.DataRow edvPartPlantRow = edvPartPlant.CurrentDataRow;
if ((edvPartPlantRow != null))
{
edvPartPlantRow.BeginEdit();
edvPartPlantRow["EISCodeDesc_c"] = adapterRow["Character01"];
edvPartPlantRow["EISCode_c"] = adapterRow["Key1"];
edvPartPlantRow.EndEdit();
}
}
}
private void finSpcBTN_ADW_Click(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
SearchOnUD19AdapterShowDialog();
}