IOM 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.3KViews0likes8CommentsHow 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! AngelaSolved0Views0likes6CommentsHow 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! AngelaSolved0Views0likes2CommentsIOM 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'0Views0likes2CommentsCompatibility 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, DaanSolved0Views0likes1CommentHow 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!0Views0likes5Commentsapply PE_createNewRevision from client method
hello, My initial goal is to have a confirm pop up when using the action to create a new revision.(for parts) I have an action that run a simple client method like this: if(confirm("creation of new major revision")) { //here i want to launch the PE_CreateNewRevision } I've tried with applyMethod but the method doesn't seem to apply on the part instance. Any help on understanding this is much appreciated. thanks lucasSolved6.1KViews0likes10CommentsHow to get the value of relationship item type using the return value of fetchRelationships
hi,All 'my code 'This is the code I tried to write in VB Me.fetchRelationships("File") Dim file as Item = Me.getRelationships("File") Dim t_file_id as string If file.getItemCount()>0 Dim fileCnt as Integer=file.getItemCount() For x=0 To fileCnt-1 t_file_id = file.getItemByIndex(x).getProperty("related_id") file1= file.getItemsByXPath("Relationships/Item[@id='"+t_file_id+" ']") file1.getProperty("doc_name") ' return Not a single item Next End If 'file 'The value obtained is shown below How do I get the doc_name value? If somebody knows and can help I would really appreciate that. Thank you.4KViews0likes2Comments