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 Reply Children
  • Hi Ramana Raju Santhana

               In the recordlist file initialize i have put the event

     this.events['click [name=edit_button]'] = 'edit_button';

    and then i have called the 

    edit_button:function(){

    alert('edit button')
    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];
    }
    });
    model.fields['parent_name'].options = parent_list;



    },

    I have also tried using dependancies

    $dependencies['Calls']['so_parent_type'] = array(
    'hooks' => array("edit","save"),
    'trigger' => 'true',
    //'triggerFields' => array('parent_name'),//also changed to parent_type
    'onload' => true,
    'actions' => array(
    array(
    'name' => 'SetOptions',
    'params' => array(
    'target' => 'parent_type',//also changed to parent_type
    'keys' => 'getDropdownKeySet("forActivities_list")',
    'labels' => 'getDropdownValueSet("forActivities_list")'
    ),
    ),
    ),
    );