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
<SPAN class="keyword token">var</SPAN> insp <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">new</SPAN> <SPAN class="token class-name">ArcGIS<SPAN class="punctuation token">.</SPAN>Desktop<SPAN class="punctuation token">.</SPAN>Editing<SPAN class="punctuation token">.</SPAN>Attributes<SPAN class="punctuation token">.</SPAN>Inspector</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
insp<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Load</SPAN><SPAN class="punctuation token">(</SPAN>jobsLayer<SPAN class="punctuation token">,</SPAN> oidSet<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
insp<SPAN class="punctuation token">[</SPAN>Properties<SPAN class="punctuation token">.</SPAN>FieldNames<SPAN class="punctuation token">.</SPAN>Default<SPAN class="punctuation token">.</SPAN>SUBMIT_BY<SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> System<SPAN class="punctuation token">.</SPAN>Environment<SPAN class="punctuation token">.</SPAN>UserName<SPAN class="punctuation token">;</SPAN>
insp<SPAN class="punctuation token">[</SPAN>Properties<SPAN class="punctuation token">.</SPAN>FieldNames<SPAN class="punctuation token">.</SPAN>Default<SPAN class="punctuation token">.</SPAN>SUBMIT_DATE<SPAN class="punctuation token">]</SPAN> <SPAN class="operator token">=</SPAN> DateTime<SPAN class="punctuation token">.</SPAN>Now<SPAN class="punctuation token">;</SPAN>
editOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Modify</SPAN><SPAN class="punctuation token">(</SPAN>insp<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
editOperation<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Execute</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>editOperation<SPAN class="punctuation token">.</SPAN>IsSucceeded<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
success <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">await</SPAN> CommitChangesUtils<SPAN class="punctuation token">.</SPAN><SPAN class="token function">SaveEdits</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>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