Search code examples
dynamics-crm-2011dynamics-crmmicrosoft-dynamicsdynamics-crm-2016

clearoption for optionset in crm business process flow


I have a business process flow In one of its steps I have added an option set(sub category)

enter image description here

I am trying to clear the options in the optionset using the below code

Xrm.Page.getControl("new_subcategory").removeOption(100000005)
Xrm.Page.getControl("new_subcategory").clearOptions()

This removes the options for the optionset that is inside the form, but it is not removing for the same option set that is in the step of business process flow


Solution

  • You need to added header_process_ to the id. So:

    Xrm.Page.getControl("header_process_new_subcategory").removeOption(100000005)
    Xrm.Page.getControl("header_process_new_subcategory").clearOptions()
    

    SDK reference