Select classification in dialog

Former Member
Former Member
I'm trying to get users to select a classification before the main form for an item displays. To do this I have a very simple dialog box with an Item field and a Classification field. This form is connected to the Item Type as a View. In the Item Type client events I launch the dialog box. Everything is good to here. I can select the Item field. It brings up a search grid. When I click the classification field it opens a dialog that is empty. Any clues on how to get the classifications to display for the user to select? Thanks, Brian.
Parents
  • Hello Brian, You can try with below method to create classification dialog box.Attach method on onshowItem event in client Event. if (this.getProperty("classification", "") !== "") { top.aras.evalMethod("OnShowItemDefault", inDom, inArgs); return; } var inno = this.getInnovator(); var thisType = this.getType(); var Related_Item = top.aras.getItemTypeForClient(thisType, "name"); Related_Item = Related_Item.node; var itemLbl = top.aras.getItemProperty(Related_Item, "label"); if (!itemLbl) { itemLbl = top.aras.getItemProperty(Related_Item, "name"); } var dialogSizes = []; dialogSizes["Design Request"] = { width : 340 , height : 300 }; var mainWindow = window; var param = { aras : top.aras, isEditMode : true, itemTypeName : thisType, class_structure : top.aras.getItemProperty(Related_Item,"class_structure"), dialogType : "classification", title : "Select the type of "+itemLbl+" you want to create", selectLeafOnly : true, isRootClassSelectForbidden : true }; param.content = "ClassStructureDialog.html"; param.dialogHeight = dialogSizes[thisType].height; param.dialogWidth = dialogSizes[thisType].width; param.resizable = 1; var self = this; var wnd = aras.getMostTopWindowWithAras(window); (wnd.main || wnd).ArasModules.Dialog.show("iframe", param).promise.then( function(res){ if (res == null || res == "") {return false;} self.setProperty("classification", res); top.aras.evalMethod("OnShowItemDefault", self.node, inArgs); });
Reply
  • Hello Brian, You can try with below method to create classification dialog box.Attach method on onshowItem event in client Event. if (this.getProperty("classification", "") !== "") { top.aras.evalMethod("OnShowItemDefault", inDom, inArgs); return; } var inno = this.getInnovator(); var thisType = this.getType(); var Related_Item = top.aras.getItemTypeForClient(thisType, "name"); Related_Item = Related_Item.node; var itemLbl = top.aras.getItemProperty(Related_Item, "label"); if (!itemLbl) { itemLbl = top.aras.getItemProperty(Related_Item, "name"); } var dialogSizes = []; dialogSizes["Design Request"] = { width : 340 , height : 300 }; var mainWindow = window; var param = { aras : top.aras, isEditMode : true, itemTypeName : thisType, class_structure : top.aras.getItemProperty(Related_Item,"class_structure"), dialogType : "classification", title : "Select the type of "+itemLbl+" you want to create", selectLeafOnly : true, isRootClassSelectForbidden : true }; param.content = "ClassStructureDialog.html"; param.dialogHeight = dialogSizes[thisType].height; param.dialogWidth = dialogSizes[thisType].width; param.resizable = 1; var self = this; var wnd = aras.getMostTopWindowWithAras(window); (wnd.main || wnd).ArasModules.Dialog.show("iframe", param).promise.then( function(res){ if (res == null || res == "") {return false;} self.setProperty("classification", res); top.aras.evalMethod("OnShowItemDefault", self.node, inArgs); });
Children
No Data