Default value in a multiselect inherited from a field in another module

Hi all

I think I´ve seen an answer to this but can´t find it now - maybe I just dreamt it 

I have a multiselect field on the Contacts record (field B).

The same dropdown list is in a field on the Accounts record (field A).

When creating a new Contact, I want to give field B a default value that is the same as in the field A (on it´s Accounts related record). Basically field B = field A at that point.

How can I achieve taht?

Thanks,

KGM

Parents Reply Children
  • Hi Dipika Baghele

    Repalce following lines and let me know:

    this._filterDropdown();  

                                     to

    this.events['change your-fieldName = '_filterDropdown'; 

    Now in _filterDropdown function:

    _filterDropdown : function() {  
            // Give the name of your target multiselection field Name
            this.model.fields['your-target-fieldName'].options = app.lang.getAppListStrings('target_group_list');  
        }, 
        _dispose: function() {  
            this._super('_dispose');  
        }

    Hope this Helps..!!

    Best Regards

    S Ramana Raju