Feature service Delete method

Deletes features or objects in a layer or table that satisfy a query filter.

Delete(int LayerOrTableID, string DefinitionExpression, QueryFilter QueryFilter, string VersionName, boolean RollbackOnFailure, boolean RollbackOnFailureSpecified)




The ID of the layer or table from which to delete features or objects.


A type's definition expression.


Describes the features or objects to delete based on attribute expressions, time and/or spatial filters.


The geodatabase version to apply the edits. This parameter only applies to FeatureServices that expose geodatabases. If not specified, edits are applied to the published map's version.


RollbackOnFailure determines whether edits will be applied in a transactional manner. If set to true, and any of the edits fail, the entire edit operation will fail. If set to false, if some portion of the edits fail, they will not be applied. However, the edit operation will succeed and all others edits will be applied.

Not all data supports setting this parameter. Query the SupportsRollbackonFailureParameter property of the DataObjectTable to determine whether or not a layer supports setting this parameter. If SupportsRollbackonFailureParameter = false for a layer, then when editing this layer, RollbackOnFailure will always be true, regardless of how the parameter is set. However, if SupportsRollbackonFailureParameter = true, this means the RollbackOnFailure parameter can be set to true or false on edit operations.


Indicates if RollbackOnFailure is specified.

Return Value

There are no values returned.


The features or objects that match the criteria in query filter and definition expression are deleted from the layer or table with the identifier specified in the LayerOrTableID.