Row Modified Error from Customization

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["EISCodeDesc_c"] = adapterRow["Character01"];
			edvPartPlantRow["EISCode_c"] = adapterRow["Key1"];

private void finSpcBTN_ADW_Click(object sender, System.EventArgs args)
	// ** Place Event Handling Code Here **

Perhaps slap in a notify event right after your endedit.

oTrans.NotifyAll() might do it.

Also, might be worth setting the view before modifying to whatever that PartSite edv is:
oTrans.LastView = PartSiteEdv;

The oTrans.LastView did it.
Thanks Chris!


My new motto:

1 Like

With the power of correct programming