Field 'syncEnabled' cannot be updated.

474
1
05-10-2023 08:18 AM
Labels (2)
Big-Chill
New Contributor III

Software:

ArcGIS Pro 2.9.8

ArcGIS Enterprise 10.9.1 on a three-tiered system (ArcGIS Server and Data Store on separate server, Web Adaptor and Portal on separate servers).  IWA enabled and we are using a Net-Scaler to front the entry into Portal.

Issue:

We have created a collaboration between our internal Portal and AGOL.  The content being shared is from a file geodatabase that resides on our ArcGIS Server.  In addition, the content must be hosted, and sync enabled because we want users to have the ability to download the content from AGOL and collaboration requires the "sync" be enabled.

The problem is updating the content.  In order to update the content, sync must be disabled.  I am trying to do this programmatically, however, I keep getting an error when trying to update the data dictionary: Field 'syncEnabled' cannot be updated.

I have administrator privileges and followed some of the online examples, yet this still does not work.  Does anyone know why?  Why can I do this manually but not via Python.  Any help would be greatly appreciated.

JL

1 Reply
AndreasHolterman
New Contributor III

I recently ran into this issue as well and found your question here. I was not able to adjust the "syncEnabled" field of a hosted Feature Layer through Python, but manually it works fine. Following the documentation as described on https://developers.arcgis.com/rest/services-reference/online/update-definition-feature-service-.htm to adjust the "syncEnabled" setting would not work:

Adding the JSON code {"syncEnabled": true} to the "updateDefinition" parameter gives me the response "Field 'syncEnabled' cannot be updated".

 

 

The solution

Fortunately, I figured out how this can be done by checking the actual request being made while changing this setting manually, through the Developer Tools Interface (Press F12). Here I found out that the "updateDefinition" field of the request contained the JSON code:

{"capabilities":"Query,Sync"}

 Using this value instead does update this setting on the hosted Feature Layer.

0 Kudos