Change options in a dropdown field when a relate field changes

Hi All,

            Can you update how to change the drop down field when a relate field changes.

On change event we are checking the condition and doing as below:

relate field == 'xyz' then dropdown field = a,b,c as options in the drop down list

if relate field ==' mno' then dropdown field = d,e,f as options in  the drop down list.

1.We are able to get options but unable to update in the dropdown list when the relate field changes.

When we tried with below code:

this.model.fields['ds_c'].options = divSub_value_list;
this._super("_render"); 

above code it is rendering full view,with this we are getting problem with show and hide fields through formula.

2.When we are trying with particular field render with below code the drop down list is not updating.

    var renderField = this.getField('<field_name>');  
    renderField.render(); 

So how to update the dropdown list options based on relate field change.i am using version 7.6.1.0 ENT

Francesca Shiekh Ramana Raju Santhana Mehul  Bhandari Bhavesh Patel Angel Magana

 David López

Regards

Sidhu

Parents Reply
  • Hi Mehul  Bhandari

    Your reference links i already gone through, but those will work on rendering of the page.

    But i want onChange event on Account Name which is of relate type and when it is changed new option should be update in my dropdown field called dropdown_sub_name_c.

    Example:

    Two fields:

    1. account_name is of type "relate field", with values { Persons, Colors, Flowers }

    2. dropdown_sub_name_c is of type dropdown with list name as "dropdown_sub_name_dom" with values { "":"", "John":"John", "Glen":"Glen", "Red":"Red", "Green":"Green", "Jasmine":"Jasmine", "Rose":"Rose"}

    Requirement:

    When i change account_name, based on the value/option selected my dropdown_sub_name_c should be changed i.e

    1. account_name == Persons then i need to get only dropdown_sub_name_c == {"":"", "John":"John", "Glen":"Glen"}

    2. account_name == Colors then i need to get only dropdown_sub_name_c == {"":"", "Red":"Red", "Green":"Green"}

    3. account_name == Flowers then i need to get only dropdown_sub_name_c == {"":"", "Jasmine":"Jasmine", "Rose":"Rose"}

     

    Regards

    Sidhu

Children
No Data