am using an editor user name on a SDE SQLServer database connection.
A Map Document is created using the data with the connection above.
A map service is created on the arcgis server with mobile capabilities.
A mobile cache is created from this service.
In the application I have to edit feature layers from the cache.
In the code I have put a check FeatureLayer.AllowNew for which I get a Boolean FALSE. So I have to exit the code.
The Question is : How to create a service cache on which the FeatureLayer is editable. And I get the AllowNew as True to proceed further.
Code Block:
internal void AddVertex(object o)
{
selectedMobileMapServiceLayer = CoM_SWToCModule.ToCViewModel.SelectedMobSvrMapLayer;
if (selectedMobileMapServiceLayer == null)
{
MessageBox.Show("Select Feature From The ToC");
return;
}
selectedFeatureLayer = selectedMobileMapServiceLayer.Layer as FeatureLayer;
if (!selectedFeatureLayer.AllowNew) >>>>Returns FALSE
{
MessageBox.Show("Geometry in " + selectedFeatureLayer.Name + " is not editable");
return;
}