use
define(["dojo/aspect"], function(aspect){
var selector;
selector = dijit.registry.byNode(this.domNode.previousSibling);
if (typeof selector === "undefined") {
selector = dijit.registry.byNode(this.domNode.previousSibling.children[1]);
}
aspect.after(selector, "_renderOptions", function(deferred){
this._editNode.removeChild(this._editNode.children[0]);
return deferred;
});
});
Check the 'this' context. maybe you need a local variable to pass it.
Unfortunately, dojo.require has been deprecated in Mendix 7, have a look at the Release Notes. I think you can still try to use require (the global one).