<?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: v4.9 - Feature layer applyEdits() bug in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565520#M52779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because you are adding client side graphics via FeatureLayer.applyEdits. Anytime, you add or remove client side graphics, you must query the features to sync your client side graphics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you must query features from the layer before you call applyEdits with deletes. Please see the code below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; function deleteFeatures() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.queryFeatures({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where: "1=1",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnGeometry: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }).then(function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var deleteFeature = results.features;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const edits = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deleteFeatures: deleteFeature
&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; layer.applyEdits(edits);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp; }&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I updated your test app to show this behavior:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/anon/pen/YJBRpO?editors=1010" title="https://codepen.io/anon/pen/YJBRpO?editors=1010" rel="nofollow noopener noreferrer" target="_blank"&gt;An Anonymous Pen on CodePen&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This behavior is explained&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:22:05 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2021-12-12T00:22:05Z</dc:date>
    <item>
      <title>v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565519#M52778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a client side data source on a feature layer&lt;/P&gt;&lt;P&gt;When calling applyEdits with addFeatures specified, the object Id field on the feature layer definition and therefore the value set on the graphics attributes is not being honored when the features are added.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See this codepen for an example:&amp;nbsp;&lt;A href="https://codepen.io/anon/pen/BqvEPm?editors=1010"&gt;https://codepen.io/anon/pen/BqvEPm?editors=1010&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two features with objectIds set in the attributes are passed to applyEdits(), but when being added the object Ids are&amp;nbsp;automatically calculated by incrementing the max existing object Id and the attribute value is disregarded.&lt;/P&gt;&lt;P&gt;You can see it in the console or in the popup for the features in the example. The delete button won't delete anything as the object ids don't match anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This feels like a bug, or is it by design?&lt;/P&gt;&lt;P&gt;If a bug, any known workarounds?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't tried it on a layer with a service source,&amp;nbsp;as&amp;nbsp;it seems specific to MemorySourceWorker though I'm guessing a service source is probably ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 01:03:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565519#M52778</guid>
      <dc:creator>NickCameron2</dc:creator>
      <dc:date>2018-10-26T01:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565520#M52779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is because you are adding client side graphics via FeatureLayer.applyEdits. Anytime, you add or remove client side graphics, you must query the features to sync your client side graphics.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you must query features from the layer before you call applyEdits with deletes. Please see the code below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; function deleteFeatures() {
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.queryFeatures({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where: "1=1",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; returnGeometry: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }).then(function(results){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var deleteFeature = results.features;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; const edits = {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deleteFeatures: deleteFeature
&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; layer.applyEdits(edits);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp; }&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I updated your test app to show this behavior:&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/anon/pen/YJBRpO?editors=1010" title="https://codepen.io/anon/pen/YJBRpO?editors=1010" rel="nofollow noopener noreferrer" target="_blank"&gt;An Anonymous Pen on CodePen&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This behavior is explained&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#source" rel="nofollow noopener noreferrer" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:22:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565520#M52779</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-12T00:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565521#M52780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are an absolute legend! This was driving me crazy - thank you so much!&lt;/P&gt;&lt;P&gt;I had read those docs earlier trying to sort this out, I don't think they quite&amp;nbsp;explain what's required for deleting...solution makes sense when you see it&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;. Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2018 10:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565521#M52780</guid>
      <dc:creator>NickCameron2</dc:creator>
      <dc:date>2018-10-27T10:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565522#M52781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;In the 4.12 version of the API I am still seeing&amp;nbsp;the&amp;nbsp;behavior noted above:&amp;nbsp;"Two features with objectIds set in the attributes are passed to applyEdits(), but when being added the object Ids are&amp;nbsp;automatically calculated by incrementing the max existing object Id and the attribute value is disregarded."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;As Nick Cameron originally asked, is this expected behavior/by design?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I need attribute objectId values passed in to the applyEdits addFeatures array to match the&amp;nbsp;objectId values from the generated graphics after the applyEdits finishes as my data source sends out updates to existing features; if the objectId value is changed by the addFeature applyEdits then how am I supposed to use the applyEdits updateFeatures capability if the graphics rendered on the client don't match the objectIds sent from the data source?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2019 05:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565522#M52781</guid>
      <dc:creator>TylerKirk</dc:creator>
      <dc:date>2019-08-06T05:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565523#M52782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if I completely understand your workflow. I apologize if I misunderstood your problem and if the following explanation does not address your concern then can you please provide me with a working sample?&amp;nbsp;&lt;/P&gt;&lt;P&gt;FeatureService objectIDs are system generated and we do not have control over it. If you are calling FeatureLayer.applyEdits, featurelayer features (geomery and attributes) are automatically updated for the layer. If you are copying features from&amp;nbsp;a FeatureLayer then adding them to&amp;nbsp;GraphicsLayer lets say and calling applyEdits for the FeatureLayer... then the behavior you are seeing is correct as we do not update client-side graphics attributes once FeatureLayer.applyEdits takes place (they are no longer connected).&amp;nbsp;If you are creating a new feature then updating its attributes and expecting to see the changes in graphics in graphicslayer lets say... I'd suggest that you wait to add the new graphics to graphicsLayer until the applyEdits results are back. Once the applyEdits results are returned, you need to get new objectids, query for the features with those ids, then add the features to your graphicslayer. Do something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;// ObjectID is returned in the FeatureLayer.applyEdits.&lt;/P&gt;&lt;P&gt;function addNewFeatureToGraphicsLayer (objectId) {&lt;BR /&gt;&amp;nbsp; // query feature from the server&lt;BR /&gt;&amp;nbsp; featureLayer.queryFeatures({&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;objectIds: [objectId],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;outFields: ["*"],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;returnGeometry: true&lt;BR /&gt;&amp;nbsp; })&lt;BR /&gt;&amp;nbsp; .then(function(results) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if (results.features.length &amp;gt; 0) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var graphic = results.features[0];&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // if you are creating a new graphic why not wait until the edit results are back?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;graphicsLayer.add(graphic);&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;/BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the new graphics were added to the graphicslayer before applyEdits results are returned, then remove the current client side&amp;nbsp;graphic version and&amp;nbsp;replace the graphic with the new one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2019 20:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565523#M52782</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2019-08-07T20:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565524#M52783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Undral for the response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me better explain my workflow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upon startup&lt;/P&gt;&lt;P&gt;1. Query json REST endpoint&lt;/P&gt;&lt;P&gt;2. Convert json data to list of graphics. There is an existing identifier in the data that is set to the object id field in the graphic.&lt;/P&gt;&lt;P&gt;3. Create &lt;STRONG&gt;client side&lt;/STRONG&gt; FeatureLayer from graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Successive polls&lt;/P&gt;&lt;P&gt;1. Query json REST endpoint&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Convert json data to list of graphics. There is an existing identifier in the data that is set to the object id field in the graphic.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. After querying the&amp;nbsp;feautreLayerView, determine which graphics&amp;nbsp;need to be updated, deleted, and added by comparing object id fields between the&amp;nbsp;latest graphics from the rest endpoint and the graphics from the&amp;nbsp;featureLayerView query&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Use the featureLayer.applyEdits method to update the featurelayer graphics&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue that I am seeing is that when graphics are added to a&amp;nbsp;&lt;STRONG&gt;client side&lt;/STRONG&gt; featurelayer through the applyEdits method, the object ids for the graphics are changed from what was passed in to whatever the featurelayer decides their objectids should be; which appears to be "&lt;SPAN style="background-color: #ffffff;"&gt;calculated by incrementing the max existing object Id".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;When graphics are first added to the featurelayer through the source field, their object ids do not change.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;Ended up creating codepen to showcase the behavior I'm seeing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; "&gt;&lt;A class="link-titled" href="https://codepen.io/MotoTK/pen/voRLpY?editors=0010" title="https://codepen.io/MotoTK/pen/voRLpY?editors=0010"&gt;https://codepen.io/MotoTK/pen/voRLpY?editors=0010&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 00:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565524#M52783</guid>
      <dc:creator>TylerKirk</dc:creator>
      <dc:date>2019-08-08T00:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565525#M52784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your observations about the objectIds are correct. It is just how it works as of today. I have created an enhancement request not to override objectIds of graphics added to in memory FeatureLayer. I do not know when it will be implemented in the API. In meantime, you have to query features from your in memory FeatureLayer once applyEdits is completed as shown below. I sense that you already know how to do that. Another suggestion would be to create a new attribute field to keep to track of these unique identifiers? Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;layer&lt;BR /&gt; .applyEdits({&lt;BR /&gt; addFeatures: addFeatureGraphics&lt;BR /&gt; })&lt;BR /&gt; .then(result =&amp;gt; {&lt;BR /&gt; console.log(result);&lt;BR /&gt; &lt;BR /&gt; layer.queryFeatures({&lt;BR /&gt; objectIds: [result.addFeatureResults[0].objectId]&lt;BR /&gt; }).then(function(results){&lt;BR /&gt; console.log("features", results.features);&lt;BR /&gt; });&lt;BR /&gt; });&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 18:44:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565525#M52784</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2019-08-08T18:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565526#M52785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was already planning on moving forward with your second suggestion, "&lt;SPAN style="background-color: #ffffff;"&gt;create a new attribute field to keep to track of these unique identifiers". Let me know when this is addressed though so I can remove the workarounds at that time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Thanks Undral!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 21:50:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565526#M52785</guid>
      <dc:creator>TylerKirk</dc:creator>
      <dc:date>2019-08-08T21:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: v4.9 - Feature layer applyEdits() bug</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565527#M52786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I faced the same problem (in v4.14) - IDs are kept unchanged during the initial addition (using "source" property) but are automatically modified after "applyEdits()". It would be really great to fix this behavior!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 11:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-9-feature-layer-applyedits-bug/m-p/565527#M52786</guid>
      <dc:creator>AlexanderParshin</dc:creator>
      <dc:date>2020-01-29T11:09:30Z</dc:date>
    </item>
  </channel>
</rss>

