transport.submit Function

A function that will handle create, update and delete operations in a single batch when custom transport is used, that is, the is defined as a function.

The transport.create, transport.update, and transport.delete operations will not be executed in this case.

This function will only be invoked when the DataSource is in its batch mode.

Parameters Object

An object containing the created (, updated (, and destroyed ( items.

e.success Function

A callback that should be called for each operation with two parameters - items and operation. See example below.

e.error Function

A callback that should be called in case of failure of any of the operations.

Example - declare transport submit function
      var dataSource = new{
        transport: {
          read:  function(options){
              url: "",
              dataType: "jsonp",
              success: function(result) {
              error: function(result) {
          submit: function(e) {
            var data =;
/* The result can be observed in the DevTools(F12) console of the browser. */

            // send batch update to desired URL, then notify success/error

            e.error(null, "customerror", "custom error");
        batch: true,
        pageSize: 20,
        schema: {
          model: {
            id: "ProductID",
            fields: {
              ProductID: { editable: false, nullable: true },
              ProductName: { validation: { required: true } },
              UnitPrice: { type: "number", validation: { required: true, min: 1} },
              Discontinued: { type: "boolean" },
              UnitsInStock: { type: "number", validation: { min: 0, required: true } }
        var productOne =,
            productTwo =;

In this article