AnsweredAssumed Answered

SugarCRM 7.x how do I open app drawer with full edit from subpanel?

Question asked by Francesca Shiekh on Dec 29, 2014
Latest reply on Feb 6, 2017 by Francesca Shiekh

I created a custom rowaction for my custom subpanel to replace the inline edit.
This should open a drawer with the corresponding row in full edit.

in subpanel-list.js the code below gives me the create-actions layout but empty and ready for a new record.
How can I get "this" record (which I verified is what I want via console.log) to populate and be in edit mode instead of creating a new one? I thought I could get away with passing the model but that's not the case.


               

({
  extendsFrom: 'SubpanelListView',
  initialize: function(options){
     this._super('initialize', [options]);
     this.context.on('list:drawereditrow:fire',this.drawerEditClicked, this);
  },
  drawerEditClicked: function(){
console.log('drawerEditClicked');
console.log(this.model);
console.log(this.module);
    app.drawer.open({
       layout:'create-actions',
       context:{
         create: true,
         model:this.model,
         module:this.module,
       }
    });
  },
   _dispose: function() {
     this._super('_dispose');
   },
});

                                           
thanks,
FrancescaS

Outcomes