Hi.
I'm trying to create a row in a table whenever a feature in another feature class has been created. Inside my code I'm subscribing to the RowCreatedEvent like so:
RowCreatedEvent.Subscribe(OnRowCreated, table); // The table is the feature class mentioned
I have a method called OnRowCreated and whenever a feature is created in the feature class, the code is actually going to that method. So that part is working.
In the OnRowCreated method I have the following lines:
using var geoDatabase = new Geodatabase(new FileGeodatabaseConnectionPath(new Uri(...)));
using var table = geoDatabase.OpenDataset<Table>(...);
var attribs = new Dictionary<string, object?> { { "LCID", "Testing" } };
args.Operation.Create(table, attribs);
When I run the code it's stepping through and the geoDatabase and the table variables are filled with the correct values. The table is where I want to create a new row. I also made sure the feature class and table is editable. I then create a dictionary with one attribute and value, since none of the fields are mandatory, meaning they are all nullable. My code passes through without errors or exceptions. After that ArcGIS Pro shows me this:
![CarstenAndersson_0-1706690594730.png CarstenAndersson_0-1706690594730.png](https://community.esri.com/t5/image/serverpage/image-id/93265i9EDD53FBE37A13C2/image-size/medium?v=v2&px=400)
The feature is not created and no new row is created in the table. I turned on the Diagnostics Monitor, and this is what I see
![CarstenAndersson_2-1706690709033.png CarstenAndersson_2-1706690709033.png](https://community.esri.com/t5/image/serverpage/image-id/93267i3C5AAB2DAB068E4E/image-size/large?v=v2&px=999)
I'm stuck so any help is greatly appreciated 🙂
Regards
Carsten