Select to view content in your preferred language

Update() is broken for FeatureLayer

662
0
06-06-2013 09:25 AM
danbonab
Emerging Contributor
I have encountered an interesting bug in SL API:
If a Feature Layer (from a Feature Service) is configured in ArcGIS server without Delete capability, calling Update() on that feature layer throws a ValidationException indicating that you are not allowed to delete features!
I was trying to do filtering on a layer which does not have DELETE capability (I can't post the layer url here but you could try this ESRI's sample to reproduce: http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/FeatureServer/1).
I was setting Where to a filter string and called Update immediately after that and boom I got hit by a ValidationException.
I first thought it was because of the Where clause but even after removing the line that sets the Where clause and calling just Update I got the same error.
I tried turning on and off DisableClientCaching, turning on and off ValidateEdits,..., nothing worked.
I hope the bug gets fixed soon.

Cheers
0 Kudos
0 Replies