Hello,
I encounter a bug when I use arcpy.management.EnableEditorTracking on ArcGIS Enterprise 10.9.1 (not ArcGIS Pro)
The method seems to not support the None value for the fields parameters:
import arcpy, os
FC = os.path.join(r"\\server", "my_database.sde", "my_feature_class")
arcpy.management.EnableEditorTracking(
in_dataset = FC,
creator_field = None,
creation_date_field = None,
last_editor_field = None,
last_edit_date_field = "et_last_edit_date",
add_fields = "ADD_FIELDS",
record_dates_in = "UTC"
)
As we can see in the screenshot, the et_last_edit_date field is applied to the creator field (Champ d'auteur in french) not the last edit date field as it is specified in the code above.
