applyEdits not recognising a GlobalId that does not exist

431
2
02-22-2023 02:19 AM
JohnGomersall
New Contributor

I'm using applyEdits to update attributes of existing Features on a FeatureServer using globalIDs. e.g.

           useGlobalIds=true&updates=...&rollbackOnFailure=false
 

However, when testing this I found that if I supply a GlobalID that does not exist I still get a success response, e.g. (the second globalId does not exist):

           "updateResults": [
                {
                    "objectId": -1,
                    "globalId": "{B3AB1BA9-A4DE-46E6-92C8-4E34A421726A}",
                    "success": true
                },
                {
                    "objectId": -1,
                    "globalId": "{55555555-A4DE-46E6-92C8-4E34A421726A}",
                    "success": true
                },
 

If I try the same thing with our internal ArcGIS portal implementation I get an error:

            "updateResults": [
                {
                    "success": true,
                    "globalId": "{B3AB1BA9-A4DE-46E6-92C8-4E34A421726A}",
                    "objectId": 1
                },
                {
                    "success": false,
                    "globalId": "{55555555-A4DE-46E6-92C8-4E34A421726A}",
                    "error": {
                        "code": 10512,
                        "description": "Update for the object was not attempted. Object may not exist."
                    },
                    "objectId": null
                },
 
Note that for successful updates the Portal server also returns the existing objectId, whereas ArcGIS Online is always returning -1.
 
Is this a known limitation with ArcGIS Online?
0 Kudos
2 Replies
laura1719981
New Contributor

I have the same problem. Updates: [
{
"attributes": {
"globalId": " {EBFB9BDF-3CC2-4D20-80F1-E9953BEE47C5}",
"ddpcr_copies": 0.73,
"lim_max_p": 1.01,
"lim_min_p": 0.50,
"gotas_tot": 51671,
"gotas_pos": 32,
"gotas_neg": 51639
}
}
]

 

 

 

{
 "attachments": {
  "addResults": [],
  "updateResults": [],
  "deleteResults": []
 },
 "addResults": [],
 "updateResults": [{
  "success": false,
  "globalId": null,
  "error": {
   "code": 10528,
   "description": "Input feature does not have a global id."
  },
  "objectId": null
 }],
 "deleteResults": []
}
0 Kudos
JohnGomersall
New Contributor

I think this might be a different problem. You may want to double check the exact name of the GlobalId field for that layer as I have seen before that it can be case-sensitive.

FYI, Esri have logged a bug for the issue I experienced:

"We were able to reproduce the issue in trial and developer subscription accounts. As this issue is reproduceable over different subscription a defect was created to address this issue. The defect number BUG-000159592 can be used to track the progress of and even escalate the defect in My Esri."

0 Kudos