I have a Utility Network feature service layer (representing Service Location subtype of ElectricDevice) which is added to the map in Pro. The layer is linked to the Customer table via ServiceLocation_Customer attributed relationship class. I am writing code to consolidate multiple selected service locations (points) into one. This will require updating multiple records in the relationship class table. Another option is to delete relationship records and create new ones. I got a few questions about the process.
1. Should the relationship class be published as a feature service if I want to edit it?
2. If the relationship class needs to be published, what is the proper way to reference it programmatically? Should I be using feature service layers added to the map to access the Geodatabase and then the relationship class? Or should I determine the URL for one of the map layers, construct the URL for the relationship class and access it?
3. Is it acceptable to edit the relationship class as if it were a standalone table, or it would be better to delete records (by making the relationship class composite) and then create new records by using RelationshipDescription (editOpetation.Create(RelationshipDescription))?
I will appreciate any suggestions and code samples. Thanks!
@azlotin You should publish the attributed relationship table before editing, and then you should be able to access and edit it using the regular geodatabase relationship/table methods.
Thanks for the pointers!