(function(){"use strict";$.extend(page,{using:{types:["HierarchicalSerialEntry"]},onLoad:function(){var i=this;var t=this.url.getUid("hierarchyRoot");if(u8.isValidRecordUid(t)){return r(t.infoAreaId,this,t)}var a=this.url.get("hierarchyRootId");var o=this.url.get("hierarchyInfoAreaId");if(!o){if(a){$error("No info area id found to load the uid for id '"+a+"'")}else{$error("No info area id found to load hierarchy")}}if(!a){return r(o,this)}var n=e[o];if(!n){$error("No id loader found for info area '"+o+"'")}n(a,function(e){if(!e){$error("No uid found for id '"+a+"' in info area '"+o+"'")}r(o,i,e)})}});function r(r,e,i){var t=e.url;$("#hierarchicalSerialEntry").widget("HierarchicalSerialEntry",{hierarchyTreeViewOptions:{uid:i,infoAreaId:r,relationFilterNames:[t.get("hierarchyRelationFilter")],nodeFilterNames:[t.get("hierarchyNodeFilter")],nodeSortFields:t.getArray("hierarchyNodeSortFields"),hierarchyIndex:t.get("hierarchyIndex",0)},serialEntryOptions:u8.services.serialEntryOptionProvider.urlToOptions(t),parent:e})}var e={AR:i.curry("select from (AR) where (ItemNo='$parValue')")};function i(r,e,i){u8.create("QueryCommand",r).execute({parameters:{0:e}},function(r,e){var t=e.resultSet&&e.resultSet.rows;return i(t&&t.length&&t[0].uids[0])})}})();