Will applyEdits support gdbVersion on a feature service?

744
1
05-21-2019 12:51 AM
CalinArens1
New Contributor II

I am trying the new Editor widget in JS 4.11 (https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html) with a branch versioned feature service.

Unfortunately, the gdbVersion on the FeatureLayer (https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) is not sent with the applyEdits method. In fact, the documentation of the applyEdits method does not show many of the parameters in the REST API (https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-.htm).

Question:

Will editing versioned feature services be supported in the JavaScript API?

1 Reply
RL1
by
New Contributor II

I ended up with calling applyEdits REST API of the feature layer to apply edits to the version

axios({
  method: 'post',
  url: fs_url + '/2/applyEdits', 
  data: 'f=pjson&gdbVersion=' + gdbVersion + '&adds=[' + JSON.stringify(newFeatures) + ']&updates=[' + JSON.stringify(editFeatures) + ']'
})