问题
I have a business process flow In one of its steps I have added an option set(sub category)
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
回答1:
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
来源:https://stackoverflow.com/questions/37432632/clearoption-for-optionset-in-crm-business-process-flow