Announcement

Collapse
No announcement yet.

Dialog After Saving Record

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dialog After Saving Record

    Hello,


    I need to display select-records dialog of Test, after saving another entity's record.

    I added a code in edit.js


    setup: function () {
    alert("setup");
    Dep.prototype.setup.call(this);

    this.listenTo(this.model, 'after:save', function () {
    if (this.model.id) {
    this.actionSelectProduct();
    }
    }, this);
    }

    actionSelectProduct: function () {
    alert("select product");
    var scope;
    this.notify('Loading...');
    scope = 'SupplierFees';
    this.createView('dialog', 'Modals.SelectRecords', {
    scope: scope,
    createButton: true,
    multiple: true
    }, function (view) {
    view.render();
    }.bind(this));

    },

    First time it works. Dialog is opened after save.

    After that it is not working for any other record. Dialog just comes and then disappears.

    Please help.

    Thanks.

  • #2
    Same code wrote in exit:function(), solved the issue

    Comment

    Working...
    X