<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Javascript API: applyEdits - when does the globalID get created? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110444#M10265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what is returned after applyEdits:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213697_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Jul 2016 13:49:15 GMT</pubDate>
    <dc:creator>BatesRambow</dc:creator>
    <dc:date>2016-07-28T13:49:15Z</dc:date>
    <item>
      <title>Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110438#M10259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Javascript API Version 3.16&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an issue with the applyEdits method on a Feature Layer when creating new features.&amp;nbsp; I'm trying to get the GlobalID that is automatically generated.&amp;nbsp; The REST response shows that the globalID did successfully get created but my attempts to get it via javascript keep resulting in 'undefined'.&amp;nbsp; I'm wondering if there's a timing issue with when the globalID actually gets created?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried this with two approaches, neither successful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;First approach&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.applyEdits([projectPoly], null, null).then(function(response) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.graphics.remove(projectPoly);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.refresh();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.on('edits-complete', function(result){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projectObjId = result.adds[0].objectId;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projects = app.projectLayer.graphics;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, len = projects.length; i &amp;lt; len; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(projects&lt;I&gt;.attributes.GlobalID);&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Second approach&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.applyEdits([projectPoly], null, null).then(function(response) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projectObjId = response[0].objectId;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projects = app.projectLayer.graphics;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, len = projects.length; i &amp;lt; len; i++) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(projects&lt;I&gt;.attributes.OBJECTID == projectObjId){&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(projects&lt;I&gt;.attributes.GlobalID);&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.map.graphics.remove(projectPoly);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.refresh();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both of these cases the console.log statement returns undefined.&amp;nbsp; However if i set it to &lt;STRONG&gt;console.log(projects[i-1].attributes.GlobalID&lt;/STRONG&gt;);, I get the GlobalID of the next-to-last feature, as expected.&amp;nbsp; Why is it returning undefined for the newly created feature, especially when the REST response shows that the GlobalID was successfully created?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 18:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110438#M10259</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-27T18:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110439#M10260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remember the fields are case sensitive. I think objectId has to be uppercase to get the value. &lt;/P&gt;&lt;P&gt;Try it and see if it was the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 19:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110439#M10260</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-27T19:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110440#M10261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but that's not the issue.&amp;nbsp; The syntax of 'objectId' is what is used in the &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/featureeditresult-amd.html"&gt;FeatureEditResult&lt;/A&gt;​.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 19:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110440#M10261</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-27T19:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110441#M10262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;app.projectLayer.on('edits-complete', function(result){&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projectObjId = result.adds[0].objectId;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projects = app.projectLayer.graphics;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0, len = projects.length; i &amp;lt; len; i++) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(projects&lt;I&gt;.attributes.GlobalID);&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #2873ee;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #2873ee; font-family: inherit; font-style: inherit;"&gt;can u tell me what u get in the result from edits-complete?&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #2873ee; font-family: inherit; font-style: inherit;"&gt;I just know it will be an array, but i wanna know the structure of it.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 14px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #2873ee; font-family: inherit; font-style: inherit;"&gt;I read in somewhere that maybe for accessing the objectid u need to do something like: results.adds&lt;I&gt;.attributes.objectId&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 20:04:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110441#M10262</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-27T20:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110442#M10263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've isolated something that seems to be at issue here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both scenarios, if I &lt;STRONG&gt;console.log(projects),&lt;/STRONG&gt; I get an array of all the features in the "projects" layer.&amp;nbsp; If I explore the last object in that array, I see what I expect - the last added project's attribues, including the GlobalID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213695" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213695_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, once inside the "for" statement, if I try to view a specific project (&lt;STRONG&gt;console.log(projects&lt;I&gt;);) &lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;this is what I get:&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213696" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/213696_pastedImage_14.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice a few things:&lt;/P&gt;&lt;P&gt;1) Several attribute fields, including GlobalID, don't show up.&lt;/P&gt;&lt;P&gt;2) The ObjectIDs are different, but this is supposed to be the exact same object inside the array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what is happening here?&amp;nbsp; Why would the projects array include the object correctly, but when trying to single out that specific object, the attributes change?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:33:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110442#M10263</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T13:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110443#M10264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can u tell me what u get after this line? Cuz i think u are not getting what u want for a "project" (globalid and object,right?)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;app.projectLayer.applyEdits([projectPoly], null, null).then(function(response) {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;//here &amp;lt;--&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:39:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110443#M10264</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-28T13:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110444#M10265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what is returned after applyEdits:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213697_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110444#M10265</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T13:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110445#M10266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, u dont need the objectID, u need the global, right?&lt;/P&gt;&lt;P&gt;Cuz to getting the objectid generated for the last project u must do something like:&lt;/P&gt;&lt;P&gt;var myOBJID = response[0].objectId;&amp;nbsp; //4410&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can u open functions to see what u get?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110445#M10266</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-28T13:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110446#M10267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;functions are the internal methods of FeatureEditResult:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213710_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right, I need the globalID, which is not a property of the FeatureEditResult.&amp;nbsp; I was trying to grab the ObjectID form the FeatureEditResult and match it to the matching ObjectID attribute in the array of projects, but now I'm seeing that the objectID seems to be changing at some point in the process.&amp;nbsp; To that end, I changed the statement to match on PROJECTID (a field I create and manage), but I'm still seeing the same behavior - a changed ObjectID and a missing GlobalID, even though they do exist in the projects array.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like there's some kind of timing issue at hand, with&amp;nbsp; the asynchronous nature of the applyEdits, but I don't know how to dig any deeper.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 13:56:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110446#M10267</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110447#M10268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK now i understand.&lt;/P&gt;&lt;P&gt;Yea, i think when u do an applyedits, u need to wait till it get done, so u need to do callbacks o promises to handle the asyn issue.&lt;/P&gt;&lt;P&gt;So making a summary, u need to do:&lt;/P&gt;&lt;P&gt;After applyedits ends, rescue the objectid for the new object generated by the service.&lt;/P&gt;&lt;P&gt;After that, compare the objectid with the one u have already in the projects layer ( cuz it has to be updated already)&lt;/P&gt;&lt;P&gt;And then u get the globalid field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand the flow like this, tell me if im wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could do something like this to resolve the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function doAppEdits(projectPoly,callback){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.proyectLayer.applyEdits([projectPoly],null,null).then((response)=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (response[0].objectId){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback(response[0].objectId);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback("NONE");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//here u will get the objectid number or "NONE" if doesnt exist.&lt;/P&gt;&lt;P&gt;var doneApplyEdits = doAppEdits(pp, (callback)=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //compare the array of project that u have with the objid that u already generated here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if the layer is not refreshed maybe u will have to refresh it by force. I know there is a function to do that but i dont remember how was it.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projectGlobalID = app.projectLayer.graphics.map(project =&amp;gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(project.attributes.OBJECTID == callback){&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return project.attributes.GlobalID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3a0699; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("my global id for this project is:", projectGlobalID);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 14:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110447#M10268</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-28T14:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110448#M10269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly on the right track here.&amp;nbsp; I am not using ES6 syntax so can't use the "=&amp;gt;" operator, but this is what I have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function doAppEdits(projectPoly, callback){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; app.projectLayer.applyEdits([projectPoly], null, null).then(function(response){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(response[0].objectId){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback(response[0].objectId);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; callback("NONE");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var doneApplyEdits = doAppEdits(projectPoly, function(callback){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var projectGlobalID = app.projectLayer.graphics.map(function(project){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(callback);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(project.attributes.OBJECTID == callback){&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return project.attributes.GlobalID;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("globalID is: ", projectGlobalID);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, it's not quite there.&amp;nbsp; This is what I get in the console:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213719_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;I appreciate your continued interest, but I may have to move on to something else and leave this issue open for another time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 14:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110448#M10269</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T14:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110449#M10270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's an example showing how to get the attributes for the newly created feature. Is this what you are trying to accomplish?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsbin.com/farufutawi/edit?html,console,output" title="http://jsbin.com/farufutawi/edit?html,console,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 17:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110449#M10270</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2016-07-28T17:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110450#M10271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but I don't have a problem getting the attributes other than the GlobalID, and your example does not demonstrate this with GlobalID.&amp;nbsp; I can already get exactly what your code returns with my code above.&lt;/P&gt;&lt;P&gt;If I run your code with my data, this is the console output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="213756" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213756_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;Still no GlobalID, even though the Feature Service has that field and all other existing features have GlobalIds.&amp;nbsp; Hence the question - when does the GlobalID get created?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's the response from the REST service for this same action:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN lang="EN"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{"addResults":[{"objectId":4025,"globalId":"{E4FB8847-BECB-44C9-9C24-FFF2976996E1}","success":true}],"updateResults":[],"deleteResults":[]}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The GlobalID exists, so why isn't it showing up with the other attributes? If you can show me an example with GlobalID, that would be great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 18:03:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110450#M10271</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T18:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110451#M10272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't have a test service with globalId enabled to verify but does the globalId ever show up in your attributes when queried via the JSAPI. For example if we leave editing out of the picture and you just query your feature layer for all the features is the globalID attribute returned? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 18:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110451#M10272</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2016-07-28T18:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110452#M10273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is.&amp;nbsp; If I return an array of all the existing features in the layer, outside of an editing operation, the returned attributes include GlobalID.&amp;nbsp; This is also demonstrated in one of my posts above, where I show that the object in the 'projects' array includes the global id, but when i drill down and return a single object, after editing, the GlobalID attribute does not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example, just returning the array of feature objects by returning app.projectLayer.graphics, outside of the edit operation.&amp;nbsp; Notice the inclusion of GlobalIDs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213769_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At this point, my conclusion is that I either don't fully grasp the async timing of the edit operation and I need to take a different approach to ensure that what I'm trying to do occurs long after the edits are made, or there is a bug in the API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 18:24:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110452#M10273</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T18:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110453#M10274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I figured my problem out.&amp;nbsp; Instead of doing things on the 'edits-complete' event, I used the 'updates-end' event and made sure to refresh the layer so the update event would trigger.&amp;nbsp; This gives me the access to the GlobalID I needed.&amp;nbsp; In the end it was a pretty easy fix, I just needed a better understanding of the events available on FeatureLayer.&amp;nbsp; Thanks to all for the help!&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/213824_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 22:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110453#M10274</guid>
      <dc:creator>BatesRambow</dc:creator>
      <dc:date>2016-07-28T22:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Javascript API: applyEdits - when does the globalID get created?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110454#M10275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We were close, haha. &lt;/P&gt;&lt;P&gt;Good &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 22:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-api-applyedits-when-does-the-globalid/m-p/110454#M10275</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-07-28T22:45:10Z</dc:date>
    </item>
  </channel>
</rss>

