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);