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! AngelaSolved0Views0likes2CommentsCompatibility 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.1KViews0likes10CommentsAras.OAuth.Model error when trying to connect using IOM.dll in a .Net Core app
I'm trying to integrate the IOM.dll into a .net core application and I get the error below. "Could not load file or assembly 'Aras.OAuth.Model, Version=12.0.0.21092, Culture=neutral, PublicKeyToken=524d880b05474146'. The system cannot find the file specified." I have the following code with the variable values changed: string serverUrl = "">server/.../InnovatorServer.aspx"; string database = "DataBaseName"; string userName = "user"; string password = "userPassword"; HttpServerConnection connection = IomFactory.CreateHttpServerConnection( serverUrl, database, userName, password); Item loginResult = connection.Login(); //Get Error Here Innovator inn = IomFactory.CreateInnovator(connection); I have added the IOM.dll, Aras.Net.dll, and Aras.Diagnostics.dll as refrences from the Aris installation folder, and added a using Aras.IOM.2.6KViews0likes1CommentPopulate the WBS Elements for corresponding Activities2 in a project
<AML> <Item type="WBS Activity2" action="get" select="name" where="WBS_Activity2.related_id IN (SELECT id FROM INNOVATOR.select_activities('9CB5E2CBBBDB1728B01882'))"> <Relationships> <Item type="Activity2" action="get" select="related_id(name)"/> </Relationships> </Item> </AML> It doesn't fetch records can someone help with the correct where clause, How can I rewrite this query using just AML? Thanks in advance!1.3KViews0likes0CommentsSet the property of type item to null value if the item is null
I am setting a property of type item using the setPropertyItem from JavaScript code as below: var Item = innovator.newItem("Material", "get"); Item.setAttribute("select","id"); Item.setProperty("id", gridRow.entity.ExistingVariantMaterialId); Item =Item.apply() if(Item!==null){ partVariantItem.setPropertyItem("material", Item); } Now if i want to reset this property to null value if the item is null ,so how can i do that,please help2.7KViews0likes0Comments