docs: function changeAction(newAction, newClientRecord) {
          var self = this;
          return storeTaskRunner.run(function() {
              var dataOperation, // operation to edit the data record
                  logOperation = { // operation to edit the log record 
                      tableName: operationTableName,
                      action: 'upsert',
                      data: makeCopy(pushOperation.logRecord)
                  };
  
              // If a new value for the record is specified, use the version property to update the metadata
              // If not, there is nothing that needs to be changed in the metadata. Just use the metadata we already have.
              if (newClientRecord) {
                  if (!newClientRecord.id) {
                      throw new Error('New client record value must specify the record ID');
                  }
                      
                  if (newClientRecord.id !== pushOperation.logRecord.itemId) {
                      throw new Error('New client record value cannot change the record ID. Original ID: ' +
                                      pushOperation.logRecord.id + ' New ID: ' + newClientRecord.id);
                  }
  
                  // FYI: logOperation.data and pushOperation.data are not the same thing!
                  logOperation.data.metadata = logOperation.data.metadata || {};
                  logOperation.data.metadata[tableConstants.sysProps.versionColumnName] = newClientRecord[tableConstants.sysProps.versionColumnName];
              }
  
              if (newAction === 'insert' || newAction === 'update') {
                  
                  // Change the action as specified
                  var oldAction = logOperation.data.action;
                  logOperation.data.action = newAction;
  
                  // Update the client record, if a new value is specified
                  if (newClientRecord) {
                      
                      dataOperation = {
                          tableName: pushOperation.logRecord.tableName,
                          action: 'upsert',
                          data: newClientRecord
                      };
                      
                  } else if (oldAction !== 'insert' && oldAction !== 'update') {
  
                      // If we are here, it means we are changing the action from delete to insert / update. 
                      // In such a case we expect newClientRecord to be non-null as we won't otherwise know what to insert / update.
                      // Example: changing delete to insert without specifying a newClientRecord is meaningless.
                      throw new Error('Changing action from ' + oldAction + ' to ' + newAction +
                                      ' without specifying a value for the associated record is not allowed!');
                  }
                  
              } else if (newAction === 'delete' || newAction === 'del') {
  
                  // Change the action to 'delete'
                  logOperation.data.action = 'delete';
  
                  // Delete the client record as the new action is 'delete'
                  dataOperation = {
                      tableName: pushOperation.logRecord.tableName,
                      action: 'delete',
                      id: pushOperation.logRecord.id
                  };
  
              } else {
                  throw new Error('Action ' + newAction + ' not supported.');
              }
              
              // Execute the log and data operations
              return store.executeBatch([logOperation, dataOperation]).then(function() {
                  self.isHandled = true;
              });
          });
      }