title: How to disable automatic syncing of a Store in ExtJS
body: <p>ExtJS version is <code>ext-4.0.7-gpl</code>.</p>
  
  <p>When syncing a Store, the server returns me the same object in JSON format, but populated with generated Ids, that I need to put into my store data. The identifiers are in enclosed entities, like this:</p>
  
  <pre><code>{
      "id": 46,
      "name": "Excel",
      "typeExt": [{
          "ext": "xls",
          "id": "137",
          "isMain": "false",
      }, {
          "ext": "xslx",
          "id": "136",
          "isMain": "false",
      }]
  }
  </code></pre>
  
  <p>So the ids <code>137</code> and <code>136</code> are generated on server-side.</p>
  
  <p>I am trying to make it in a store's proxy <strong>(edit: Ajax type)</strong> (which itself could be wrong):</p>
  
  <pre><code>proxy.afterRequest = function(request) {
       if (request.action === 'create' &amp;&amp; request.records.length == 1) {
           me.store.autoSync = false;
           var created = Ext.JSON.decode(request.operation.response.responseText);
           request.records[0].set('id', created.id);
           request.records[0].set('typeExt', created.typeExt);
           //request.records[0].modified = {};
           //request.records[0].dirty = false;
           me.store.autoSync = true;
       }
       if (request.action === 'update' &amp;&amp; request.records.length == 1) {
           var updated = Ext.JSON.decode(request.operation.response.responseText);
           me.store.autoSync = false;
           request.records[0].set('typeExt', updated.typeExt);
           me.store.autoSync = true;
       }
  
   };
  </code></pre>
  
  <p>See the commented variants. </p>
  
  <p>If I don't set <code>autoSync</code> to <code>false</code>, it gets looped infinitely.</p>
  
  <p>If I don't clear those <code>read-only</code> fields <code>modified</code> and <code>dirty</code>, the modified records are included in the next syncronization request, if I edited another record, it sends an <em>Array</em> of records which breaks my server-side service.</p>
  
  <p>If I clear <code>dirty</code> and <code>modified</code> like it is shown in the commented lines, the update operation works only once. I press Update button in RowEditing plugin dialog, but it never sends the needed request to the server for the second time.</p>
  
  <p>In the latter case I guess I broke something by hand-editing the readonly fields, but I can not find what.</p>
  
  <p>How do people usually handle issues liek this?</p>
  
  <blockquote>
    <p>PS. </p>
  </blockquote>
  
  <pre><code>request.records[0].commit(true); || request.records[0].editing = false; 
  
  || request.records[0].beginEdit(); 
  </code></pre>
  
  <p>Were tried with no seccess too.</p>