Friday, October 18, 2024

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

 In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript


label1 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870000);
    label2 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870001);
    label3 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870002);
    label4 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870003);
    label5 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870004);
    label6 = formContext.getAttribute("bosch_optionsetvalues").getOption(377870005);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870000);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870001);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870002);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870003);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870004);
    formContext.getControl("bosch_optionsetvalues").removeOption(377870005);


        formContext.getControl("bosch_optionsetvalues").addOption(label1);
        formContext.getControl("bosch_optionsetvalues").addOption(label2);
        formContext.getControl("bosch_optionsetvalues").addOption(label3);


No comments:

Post a Comment

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...