AnsweredAssumed Answered

How to populate field if you create a record  from subpanel button?

Question asked by Luca Bartolini on Jul 6, 2015
Latest reply on Jul 6, 2015 by Shijin Krishna
My target is to populate an  account_name field on Cases module only when you create ones from (just from this) subpanel Leads.
How can i achieve this?

I tryed to extend CreateView in custom/modules/Cases/clients/base/views/create-actions/create-actions.js


({    extendsFrom: 'CreateView',
    events: {
        'click a[name=create_button]': 'populateFieldAccount'
    },

 initialize:function(options){


this._super("initialize",[options]);

},

    populateFieldAccount: function() {
              console.log('populateFieldAccount');
              this.model.set('account_name','FITTIZIA_CF_0000');
    }
})




Thank you


I am using

Sugar 7.5.1 pro

Outcomes