Really inconvenient misalignment between QD results and IOM standards
(from Aras blog post re: using QD from method....) Parse the Result (of executing a QD from method): When you get the response back from the server, you can parse the results into any format you need. The resulting XML looks a bit like your typical AML data structure. However, it has some important differences to consider: The Item tag uses an "alias" attribute instead of "type". Why? How can this be overridden to comply with the rest of the IOM? The "alias" attribute may or may not match an ItemType name. You can explicitly set the alias in the Query Builder GUI. The Item tag does not include the typical "id", "typeId", or "keyed_name" attributes. Why? How can this be overridden to comply with the rest of the IOM? Item properties contain the id of the referenced item. Related items appear in the "Relationships" tag on the relationship item - not in the "related_item" tag. Why? How can this be overridden to comply with the rest of the IOM?84Views0likes1CommentIOM TypeInitializationException error with Login
I have been trying to use IOM on 11SP9 but I'm unable to get this code working... // url = "">myserver/InnovatorServer"; url = "">myserver/.../InnovatorServer.aspx"; var myConnection = IomFactory.CreateHttpServerConnection(url, db, user, password); var objItemRes = myConnection.Login(); if (objItemRes.isError()) { MessageBox.Show("Login error " + objItemRes.dom.InnerText); } It gives this error: 999 HTTP Error HttpServerConnection System.TypeInitializationException: The type initializer for 'Aras.Net.WindowsAuthenticationHelper' threw an exception. My project is build on .NET 4.5.2 and I have referenced IOM.dll Version 11.0.0.6549 (1/19/2017) What can be wrong?9.5KViews0likes8CommentsHow to get more specific error details from getErrorDetail() ?
Hi community, we can use getErrorString() and getErrorDetail() to catch error information from failed queries. getErrorString() only contains a short description, while getErrorDetail returns the short-description + some long text + some XML content. Does anyone know a way to only get the xml part of getErrorDetails() that contain the item information? I most of the time use getErrorString, but I have a use case for mass operations, where the xml part contains the relevant information if something went wrong. I want to provide more precise feedback to the end users (what has failed exactly), but also use the xml information to call some "automatically repair if this error happens" function. But for this function I would need the item information in the xml part. Does anyone has and idea to get more specific error details? Thanks and best regards! AngelaSolved79Views0likes6CommentsHow can I wait for the result of aras.evalMethod when the called Method opens a dialog?
Hi community, I have a custom button inside Form that leads to a custom Method. This Method calls a second client Method with aras.evalMethod. The second Method does a few checks and then opens a "confirm" dialog. User have to press OK or cancel the dialog. The overall concept works fine, but I cannot get a valid result of the aras.evalMethod call. The second Method shall return the result of the selected dialog option. But the first Method doesn´t wait for the result of the second Method. So my result will be empty / undefined. First Method [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:dfb2fd99-4ad3-47f9-a2ba-e5d476b7c094:type=javascript&text=const%20args%20%3D%20%22%22%3B%0Aconst%20result%20%3D%20aras.evalMethod%28%22MySecondMethod%22%2C%20document.thisItem%2C%20args%29%3B%0Aif%20%28typeof%20result%20%3D%3D%20%22object%22%20%7C%7C%20result%20%3D%3D%3D%20false%29%0A%7B%0A%20%20%20%20return%3B%0A%7D%0A%0Aalert%28result%29%3B%20%2F%2F%20We%20immeditelly%20get%20this%20alert%20after%20the%20Method%20call.%20It%20will%20be%20empty%2C%20as%20the%20dialog%20it%20self%20wasn%C2%B4t%20resolved%20yet.%0A%0A%2F%2F%C2%A0Other%20code%2C%20e.g.%20hide%20a%20button%0Aconst%20el%3Ddocument.getElementById%28%22myelement%22%29%3B%0Ael.style.visibility%20%3D%20%22hidden%22%3B] Second Method [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:70a41c6e-8770-4a71-bc45-938927eac638:type=javascript&text=%5B...%5D%0Awindow.ArasModules.Dialog.confirm%28message%2C%20dialogOptions%29.then%28%0Afunction%28res%29%20%0A%7B%0A%20%20%20%20switch%20%28res%29%20%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20case%20%27ok%27%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20dosomething%28%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20return%20true%3B%0A%20%20%20%20%20%20%20%20default%3A%0A%20%20%20%20%20%20%20%20%20%20%20return%20false%3B%0A%20%20%20%20%7D%0A%7D%29%3B%0A] I tried using promises and async/await. But so far aras.evalMethod never waited for anything. I could merge the two Methods, but currently the second Method is called from multiple contexts. So this is something I want to avoid if possible. Does anyone has an idea that could work to improve the situation? Thanks! AngelaSolved63Views0likes2CommentsIOM Factory (VBA)
I want to update part bom quantity based on the data in Excel I registered the IOM.tdl in the VBA tool and wrote the following VBA code (based on the manual): Dim f As New IomFactory 'must use the New keyword Dim innov As Innovator 'Establish User Credentials URL = "">localhost/.../InnovatorServer.aspx" db = "API12" user = "admin" pw = "innovator" Dim conn As HttpServerConnection Set conn = f.CreateHttpServerConnection(URL, db, user, pw) ' create a connection Dim result As Item Set result = conn.Login If result.IsError Then MsgBox result.getErrorString Exit Sub End If However, I am encountering an error stating that CreateHttpServerConnection is not registered. Does anyone have any suggestions on how to fix it? * P.S. I also tried OData to try to get the part bom data, but the http result is 'no data found'105Views0likes2CommentsCompatibility of IOM.dll with .NET Core 8
Hello Innovators, I am currently trying to integrate the IOM.dll with .NET Core 8. Has anyone successfully managed to get it working? If not, are there any recommended workarounds or alternative approaches? Looking forward to your insights. Best regards, DaanSolved56Views0likes1CommentHow to use getid() method to get id?
In the system the "Id", and "config-id" are the item name. For Document item, the id is the document name(screenshot below). I need the id property, the one that is unique, to be added to the properties of Document item. I have this method but it doesn't work: Item myItem = this.newItem("Document"); myItem.setID(this.getID()); Item results = myItem.apply(); Error is "Error Number: CS0161, 'ItemMethod.methodCode()': not all code paths return a value" Also, once I have this method working what are the next steps. I guess I will have to add this method to the Server Events, event onBeforeGet, correct? Any help is appriciated. Thanks!115Views0likes5Comments