I have a custom entity with several OptionSets that are configured as read only on the form layout. I selectively enabled these option sets via javascript based on custom business logic. When I select a value in the option set the selection list does not close. If enable the field in the form layout everything works as expected. I'm using
Xrm.Page.getControl(sFieldName).setDisabled(false)
to enable the field from within in my code. What am I doing wrong here? I would expect an option set enabled via the xrm api would work properly, but that just doesn't seem to be the case. Is there a preferred method for enabling option sets via code? Am I doing something out of order? Do I need to wait for the form to fully load before enabling the fields?





