I have a Collector for ArcGIS application which records the last_edited_user from the field, however post-processing needs to occur and overwrites my users from the field to my desktop user. Is there a way to lock the last_edited_user to maintain my initial edited user? I am using ArcGIS For Server 10.2.1 and SQL Server Database 2008 R2.
Hi Geoffrey,
Before your post-processing, you can Disable Editor Tracking. After the post-processing is finished, you can then Enable Editor Tracking. This workflow will not affect the editor tracking from the field collectors.
This sounds like the likely solution, my post-processing is in the form of a field calculation and a search cursor in a python script. From a conceptual point of view, would I disable editor tracking at the beginning of the script and enable at the end?
From a conceptual point of view, would I disable editor tracking at the beginning of the script and enable at the end?
Yes, that is correct.
This leads to another caveat, since this feature class is consumed by a feature service, it is locked and I receive this error.
EDIT: if I use arcpy.disconnectusers it stops my feature classes.
Traceback (most recent call last):
File "C:/PeterScripts/Harbor.py", line 56, in <module>
arcpy.DisableEditorTracking_management(SDEFeatureClass)
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 3529, in DisableEditorTracking
raise e
arcgisscripting.ExecuteError: ERROR 000464: Cannot get exclusive schema lock. Either being edited or in use by another application.
Failed to execute (DisableEditorTracking).
You can disable schema locking on the service: