AnsweredAssumed Answered

Add custom button on subpanel list and open a drawer with record view

Question asked by mickeytang mickeytang on Aug 12, 2015
Latest reply on Sep 2, 2015 by Alexandre Moulin
I read this article: and succeed to create a button on record view to open a drawer.
However, I want to move the button from record view to subpanel list like the following image
However, the drawer popped out but the layout and view is not rendered.

I will be glad if anyone can help.
I am using Sugarcrm 7.6 Enterprise

My source code:

({    extendsFrom: 'RecordlistView',
    initialize: function(options) {
        app.view.invokeParent(this, {type: 'view', name: 'recordlist', method: 'initialize', args:[options]});
        this.context.on('button:count_contacts:click', this.count_contacts_code, this);
    count_contacts_code: function() {
                var AcctID = this.model.get('id');
      'GET', app.api.buildURL('drawe_drawertest2/' + AcctID + '/count_contacts'), null, {
                        success: function(data) {
                      {layout:'count-contacts',context:{totalContacts: data}});
                        error: function(error) {
                      "server-error", {
                                        level: 'error',
                                        messages: 'ERR_GENERIC_SERVER_ERROR',
                                        autoClose: false
Other files are exactly the same as the example in