CRM 2016 #Optionsets #JavaScript #CRM2016 #MoussaElAnnan #Xrm
//Adds an option to an option set control.
Xrm.Page.getControl(arg).addOption(option, [index]);
//Clears all options from an option set control.
Xrm.Page.getControl(arg).clearOptions();
//Removes an option from an option set control.
//Arguments
//Type: Number: The value of the option you want to remove.
Xrm.Page.getControl(arg).removeOption(number);
//Sets the focus on the control.
Xrm.Page.getControl(arg).setFocus();