How to Update the value of xClasss xProperty by AML or API?
Hi Eli, How to Update the value of xClasss xProperty via API or AML? I can get the value of an xProperty via MyItem.getProperty("xp-MyPropertyName") or AML. But I failed to update xProperty this way. Item MyItem = innovator.newItem("Part","edit"); MyItem.setID("xxxxxxxx"); MyItem.setProperty("xp-length","10"); MyItem.apply(); Lin6.2KViews0likes3CommentsCan you Remove xClass relationship with onChange field event?
I'm trying to clear out the xClass relationship when the class of a part is changed. The code I have below is ran on the filed event of the drop down onChange, however it doesn't remove the xClass relationship. var rootItem = document.thisItem; rootItem.fetchRelationships("Part_xClass"); var xClassRelationship = rootItem.getRelationships("Part_xClass"); if(xClassRelationship.getItemCount() > 0){ var current = xClassRelationship.GetItemByIndex(0); rootItem.removeRelationship(current); } return rootItem;3.5KViews0likes1CommentLoad xClass and xProperties, and link xProperties to multiple xClasses from AML
We want to load 1k+ xclasses to Aras, we are talking about 4k+ xproperties here. When we are running AML for creating relations xClass_xProperty_Flatten and xClass_xPropertyDefinition to link them to class tree, it fails with error : <faultstring><![CDATA["xClass_xProperty_Flatten" can be added or deleted or updated only in XTree context]]></faultstring> <detail> <af:legacy_detail><![CDATA["xClass_xProperty_Flatten" can be added or deleted or updated only in XTree context]]></af:legacy_detail> <af:exception message=""xClass_xProperty_Flatten" can be added or deleted or updated only in XTree context" type="System.ArgumentException" /> </detail> I can load property definitions, but not classes, but can’t map the properties to classes. How can we mass create and reuse these xProperty definitions in more than one class from AML, by creating relations correctly?2.3KViews1like1Commentxclassification dialog from custom method
hello i'm begining a project, the idea is to have a an action launch a dialog to select a xclass. I would like to launch the same dialog as the one that pops up when adding a part xclass and x property(see below): after the user selected a class i want to retrieve the name of the class he chose. The following step is to have a second dialog (depending on the classification chosen) this second dialogs might be hard coded or dynamically buit i'm still unsure and they are going to look like the form used to fill the xproperty after you choose your part class but slightly different: i want to add a column of check boxes for future business logic. i've tried to search for the xclass tree selection dialog but couldn't find it i've tried to display some that i could find in the code tree but without sucess, i used the dialog api, here is my code:[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:84128d64-2f8e-495b-800a-afbacbd16030:type=text&text=var%20param%20%3D%20%7B%0D%0A%09aras%3A%20top.aras%2C%0D%0A%09type%3A%20%22HTMLEditorDialog%22%2C%0D%0A%09sHtml%3A%22here%20i%27ve%20tried%20to%20put%20just%20the%20name%20and%20the%20full%20path%20but%20it%20didn%27t%20seem%20to%20work%20as%20even%20when%20i%20changed%20form%20i%20was%20always%20getting%20same%20form%20opening%20%22%2C%0D%0A%09dialogWidth%3A%201000%2C%0D%0A%09dialogHeight%3A%20500%2C%0D%0A%7D%3B%0D%0A%0D%0A%2F%2F%20This%20will%20be%20called%20after%20the%20dialog%20is%20closed%0D%0Afunction%20callback%28res%29%20%7B%0D%0A%09if%20%28res%29%20%7B%0D%0A%09alert%28res%20%2B%20%22%20loves%20learning%20about%20new%20opening%20HTML%20pages%20as%20dialogs%21%22%29%3B%0D%0A%09%7D%0D%0A%7D%3B%0D%0A%0D%0A%2F%2F%20Open%20the%20dialog%0D%0Avar%20topWnd%20%3D%20top.aras.getMostTopWindowWithAras%28%29%3B%0D%0Avar%20wnd%20%3D%20topWnd%20%3F%20topWnd%20%3A%20window%3B%0D%0Awnd.ArasModules.Dialog.show%28%27iframe%27%2C%20param%29.promise.then%28callback%29%3B] any help is welcome thanks lucas1.5KViews0likes1Comment