Bug with editOperation.Execute()

146
0
05-13-2020 10:23 PM
VictorTey
Esri Contributor

Just taking a shot here if anyone have encounter or have a solution to this very sporadic issue I have encountered

ArcGIS Pro 2.4.3

var insp = new ArcGIS.Desktop.Editing.Attributes.Inspector();
                    insp.Load(jobsLayer, oidSet);
                    insp[Properties.FieldNames.Default.SUBMIT_BY] = System.Environment.UserName;
                    insp[Properties.FieldNames.Default.SUBMIT_DATE] = DateTime.Now;                   
                    editOperation.Modify(insp);
                    editOperation.Execute();
                    if (editOperation.IsSucceeded)
                    {
                        success = true;
                        await CommitChangesUtils.SaveEdits();
                    }‍‍‍‍‍‍‍‍‍‍‍

I have a code as shown above that returned successful.  editOperation.IsSucceeded also returned true. 99% of the time this have worked well. However twice I encountered an issue where even when editOperation.IsSucceeded have returned true, a edit did not took place (fields not updated). 

However if I edit that specific feature from ArcGIS pro UI then rerun this, that feature gets updated properly.

Feels as if something had locked up that specific feature.

Test I have taken:

  • Tested on a new ArcGIS Pro project with the same result (same row is stucked) This lead me to believe it is a geodatabase issue.
  • Re-Run multiple times
  • Check layer.isEditable (both set on UI and in code)

No exception thrown

0 Kudos
0 Replies