Web Map edit not showing; applyEdits error

651
4
Jump to solution
07-18-2018 04:14 PM
Highlighted
MVP Regular Contributor

My organization has two almost identical web maps on ago.

Each has several editable feature services from my local server.

The web maps are set to allow edits on these layers.

In one web map, I can get the edit dialog to popup, and I can successfully save an edit.

In the other web map, I cannot do this: Instead, I can click edit, hover the mouse over the map,

and although I see the prompt to 'Click to add a point. Press CTRL to enable snapping', nothing happens when I click.

I used ago assistant to ensure that there are no issues with the web map json.

I also verified the source mxd has no issues, reset field order, republished, and the service is ok too.

All is fine with the gdb schema.

See the f12 network pics for the web map that can successfully edit, vs the one that can't.

The f12 console tab showed no errors for either web map.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Regular Contributor

I tried editing the mxd directly, and got an error:

The create feature task could not be completed. Insufficient permissions[database.schema.fc]

found this thread:

My GIS team has established a practice to maintain consistency in the publishing process:

Use the Database Connection authentication for the username that created the version in the mxd to be published.

So, all of the layers dragged in from arcCatalog into the mxd came from there.

The arcCatalog connection should be connected using the user's authentication, and the Geodatabase Connection Properties should be pointing to the version the user created.

This same arcCatalog connection should be registered with the server prior to publishing a service.

This is accomplished by using the 'Import', not 'Add' button of the 'Register Database' dialog of ArcGIS Server Properties.

Doing it in this manner will allow you to choose the exact arcCatalog connection that is consistent with the layer data sources in the mxd.

Suggested name format for the registered database is 'Instance_Username_Database_Version'

with that said, the thread above might imply that I also need to give that same user the appropriate privileges using arcCatalog.

Also, as the thread mentioned, only give the user 'Connect' privileges within sql server.

This was the solution.

View solution in original post

0 Kudos
4 Replies
Highlighted
MVP Regular Contributor

It looks like the difference in the network between the two is that the one that works shows a 'buttonEnabled.png', whereas the other one never reaches that step.

See pic

0 Kudos
Highlighted
MVP Regular Contributor

I also see an error in the applyEdits from the preview pane of f12 tools:

  1. {error: {code: 400, message: "Unable to complete operation.",…}}
    1. error:{code: 400, message: "Unable to complete operation.",…}
      1. code:400
      2. details:["Internal error during object insert."]
      3. message:"Unable to complete operation."

The applyEdits should return something like this instead, but its' not:

  1. {addResults: [{objectId: 1, globalId: "{C11CC1C1-1C-111C-CC1C-1C11C1C1}", success: true}],…}
    1. addResults:[{objectId: 1, globalId: "{C11CC1C1-1C-111C-CC1C-1C11C1C1}", success: true}]
      1. 0:{objectId: 1, globalId: "{C11CC1C1-1C-111C-CC1C-1C11C1C1}", success: true}
        1. globalId:"{C11CC1C1-1C-111C-CC1C-1C11C1C1}"
        2. objectId:1
        3. success:true
    2. deleteResults:[]
    3. updateResults:[]

(Note, I changed the real object id and global id numbers for example's sake)

Looking at the AcrGIS Rest API, I found out that my feature service error code is 1017:

https://developers.arcgis.com/rest/services-reference/feature-service-error-codes.htm

https://developers.arcgis.com/rest/services-reference/apply-edits-feature-service-.htm

0 Kudos
Highlighted
MVP Regular Contributor

I have also tried different browsers, clearing cache and cookies.

I set left security open to everyone at the service level.

The web map is shared only to my organization, and further, to a group within my organization.

Still have same issue.

0 Kudos
Highlighted
MVP Regular Contributor

I tried editing the mxd directly, and got an error:

The create feature task could not be completed. Insufficient permissions[database.schema.fc]

found this thread:

My GIS team has established a practice to maintain consistency in the publishing process:

Use the Database Connection authentication for the username that created the version in the mxd to be published.

So, all of the layers dragged in from arcCatalog into the mxd came from there.

The arcCatalog connection should be connected using the user's authentication, and the Geodatabase Connection Properties should be pointing to the version the user created.

This same arcCatalog connection should be registered with the server prior to publishing a service.

This is accomplished by using the 'Import', not 'Add' button of the 'Register Database' dialog of ArcGIS Server Properties.

Doing it in this manner will allow you to choose the exact arcCatalog connection that is consistent with the layer data sources in the mxd.

Suggested name format for the registered database is 'Instance_Username_Database_Version'

with that said, the thread above might imply that I also need to give that same user the appropriate privileges using arcCatalog.

Also, as the thread mentioned, only give the user 'Connect' privileges within sql server.

This was the solution.

View solution in original post

0 Kudos