While i'd like to take responsibility for this fix, i actually found it here. http://ashwaniashwin.wordpress.com/2014/04/27/this-get_editview-is-null-or-not-an-object-error-during-jscript-controls-clearoptions-in-crm-2013/
However if you're lazy then the short answer is for some reason the option set list gets dropped in the following:-
for (var ctrl in controls) {This means that when we call the following it doesn't exist.
controls[ctrl].clearOptions();So as mentioned on the post above to fix this you can do the following:-
//controls[ctrl].clearOptions(); var childoptionset = Xrm.Page.ui.controls.get(childField); childoptionset.clearOptions();The Dependent OptionSets should now work as required!