crm 2015 Remove options list value on form load without removing it from the actual option list RRS feed

  • Question

  • I am looking for a way to remove some option set values from an option set when the form loads as they are no longer relevant but we want to keep the old values for historical records. I have been unable to find a javascript snippet that I can alter to assist with this. Any guidance would be greatly appreciated. This seems to be a common issue but finding the answer is has proven elusive.


    Wednesday, November 11, 2015 5:25 PM


  • Hey,

    Try below code. You have change the field name and provide the option set value that you want to remove.

    if(Xrm.Page.getControl("Field Name")!=null)
      Xrm.Page.getControl("Field Name").removeOption(Option set number);


    • Marked as answer by JenniferNHS Thursday, November 12, 2015 2:02 PM
    Wednesday, November 11, 2015 11:11 PM