parent name dropdown remove options in record list view

Hi All,

                   I want to remove the parent_type options(parent_type_display-drop down list)  and display only Account 

in the parent type[Relate To field] of calls.

                    I was successful in the create and record view.But facing issues in the record list view(list view of calls).

                  Can any one help me out with this.

Regards

Sidhu

Tevfik Tümer Shijin Krishna Ramana Raju Santhana Ajay Kumar 

Parents
  • Hi All,

                   This is what i have done in the create and records views


    initialize: function(options) {
    this._super('initialize', [options]);

    this.hideDropdownValues();//function in intialize

    },

    hideDropdownValues: function(){

    var parent_list = app.lang.getAppListStrings('parent_type_display');

    Object.keys(parent_list).forEach(function(key) {
    console.log(parent_list[key]);
    if(parent_list[key].match(/Projects/) || parent_list[key].match(/Account/)){
    //do nothing
    }
    else
    {
    delete parent_list[key];
    }
    });
    this.model.fields['parent_name'].options = parent_list;

    },

    But failing badly in the record list 

    Regards

    Sidhu

Reply
  • Hi All,

                   This is what i have done in the create and records views


    initialize: function(options) {
    this._super('initialize', [options]);

    this.hideDropdownValues();//function in intialize

    },

    hideDropdownValues: function(){

    var parent_list = app.lang.getAppListStrings('parent_type_display');

    Object.keys(parent_list).forEach(function(key) {
    console.log(parent_list[key]);
    if(parent_list[key].match(/Projects/) || parent_list[key].match(/Account/)){
    //do nothing
    }
    else
    {
    delete parent_list[key];
    }
    });
    this.model.fields['parent_name'].options = parent_list;

    },

    But failing badly in the record list 

    Regards

    Sidhu

Children