How to check my schedular is running?
Hi, I have a method that need to run via schedular on every 1 minute. I need to check and hold the schedular until previous trigger (schedular execution) got completed. if the previous schedular execution is in process then we got error for next trigger, i.e. SQL transection error. Please suggest how to overcome this situation. I do not want to increase the schedular frequency. Thanks in Advance Deepak0Views0likes2Comments'The given key '()' was not present in the dictionary.' Error
Wanted to provide a solution to an old post on here. In our situation, when this item presented, it was a missing item from one of the float codes, specifically for updates. This is a C#, server-side method. Under the 'new Dictionary' item list, we added the missing item by its item type name and the name in which we would like to describe it--there should be others listed as well to model from. Your switch(thisType) list should be consistent with the new Dictionary list below it as well. After saving this method, your item should be able to save and float that information. If it does not, inspect other dictionary code lines in your float methods.0Views1like0CommentsAny way to instantiate a C# class that is within another method or file?
I have written a C# class helpful for me in refactoring some processing of an older method. This C# class could prove helpful for other modules which perform the same logic. Is there anyway to have this class defined in a C# server method that I can instantiate whenever I want? I know one can call a server method from a server method, but that will return AML and can do processing within it, but that would not be ideal as it would require extra work to lay out how to trigger to perform x or get y, etc. when I may only really need to do something small and then would need to make sure to return the correct AML and would become a mess if something else wants to do the same thing with a different return value in the AML, it would be unpragmatic. So any way to instantiate a C# class? Do I need to go into the code tree or something? Preferably I would like the class to share the lifetime of the server method which instantiates it. Best Regards, FrankSolved0Views0likes1CommentNeed server method to hide property of an Item for specific identity
As the tilte says. We want the "Classification" property of ItemType "Document" to be hidden for a user if they are part of a specific identity. I also want the value of "Classification" to set as "General" for these users when they search of Documents. I have achieved this. However, now we do not want the users of this identity to be able to see the "Classification" column in the search grid. How do I accomplish this. I apply the code below to "onBeforeGet". Mentioned below is my method: Innovator inn = this.getInnovator(); //Get ID of the logged in user Item alias = inn.newItem("Alias","get"); alias.setProperty("source_id",inn.getUserID()); alias.setAttribute("select","related_id"); alias = alias.apply(); string relatedId = alias.getProperty("related_id"); int count = alias.getItemCount(); string target = "DBA5D86402BF43D5976854B8B48FCDD1"; if(relatedId == target){ this.setProperty("classification", "General"); this.createRelationship("Property", "edit"); this.setProperty("id", "DE3C90BC7B434151A6F3C9D97A5B2B69"); // Property ID this.setProperty("is_hidden", "1"); // Hide the property this.setProperty("is_hidden2", "1"); // Hide the secondary property } return this;0Views0likes1CommentWhat is the correct syntax of writing "where" statement in AML with C#
I need to write just write one line of AML wrapped in C# and store the ID of the item in a variable code: Innovator inn = this.getInnovator(); string amlString= @"<AML><Item type='Document' action='get' where='item_number='MADL002828'' select='Document.id'/></AML>"; Item results = inn.applyAML(amlString); return results; Everything works except for the "where" clause in it. Just can' figure out the what kind of quotation marks does this require. Thanks!0Views0likes1CommentNeed Guidance: Prevent On Close Server Event to get called when there is Error (when voting) and the CM Activity is not Closed?
Hello All, I'm creating a server-side method that sends an email to the Change Leader. It gets invoked "on close" in association with a Change Management workflow activity. The email should be sent only when the activity is closed, and the workflow progresses to the next activity. However, if the user votes on the activity while there are missing affected files related to the Change Management, an error message is displayed stating "The New Number field is required when Action is set to 'Add'." I want to find a way to prevent the email from being sent when such and similar errors exist. I tried to use activity.getProperty("state", ""); to check if the state of the activity changes from Active to Closed. However, this property does not update (when the method is invoked) while the mentioned error exists or not. Currently, I'm thinking of a way to access this error message content from my method and act accordingly. I tried isError() and it gives 0 (no error), getErrorString() and getErrorDetails() return an empty string. I would appreciate it a lot if someone can help me with it. Best Regards, abduSolved0Views0likes1CommentCan I customize Tree Grid View input XML
Hello, Question about Tree Grid View/method functionality. I'm are creating some kind of tree (for example Part BOM) & data comparison tool. I'm utilizing Query builder and I have 2 different query results in my method at hand. And now we are planning how to visualize the comparison results to the user. One idea was to utilize Tree Grid View which would fit well in our plans in many levels, but is it customizable enough is the big question. Can I somehow feed or get TGV to read my results? Can I somehow use CSS or modify how TGV could show the results (for example I want to use colors to show the differences between structures & data)? Or is it so the TGV always need's direct results from Query Builder? And the XML it's eating cannot be changed - or are they way to modify it? Or are there any other ways to do it? I believe this is not unique problem. I'm using query builder similarly like in: https://community.aras.com/b/english/posts/using-query-definitions-method-code. And I'm utilizing Form Dialogues currently to ask from user what to compare. Cheers, Jukka Lehtinen3.8KViews0likes4CommentsE-mail to Group Identity
Good day all. I am having a problem figuring out how to create a list of e-mail addresses based on the members of an Identity. I am trying to set up a C# Method to review an ItemType and send an e-mail when there are items that meet the criteria. I have everything working based on getting the the User ID of the currently logged in User. I can't figure out how to create a list of the the Member related ids to create a list of the User e-mail addresses. Thank you for any help that can be provided.Solved2.1KViews1like3CommentsHow can I use this library within aras 11 SP12?
How can I use this library within aras 11 SP12? Hello, I am trying to send an email with a copy, to generate evidence, but I have only found that I should use this method of C # System.Net.Mail.MailMessage myEmail = new System.Net.Mail.MailMessage (); myEmail.Subject = "Test Innovator Email"; myEmail.Body = "Test Email."; myEmail.From = new System.Net.Mail.MailAddress ("test@test.com"); myEmail.To.Add ("test@test.com"); CCO.Email.SetupSmtpMailServerAndSend (myEmail); and the problem that I do not know how to use this method in aras innovator, can you help me know how to use this method of denteo de aras?Solved4.8KViews0likes3CommentsUpdate Parent Item when Relationships Tab is Changed
Good day all, I have ItemType sm_ITA with a Relationship of sm_ITA_Assignment. sm_ITA_Assignment (Assignments) is not related to another ItemType. When an Assignment is added or deleted I need the sm_license_count property of the parent sm_ITA to be updated with the count of Assignments. I have read several posts that seemed to be similar to this, but can't get anything to work. I have methods that will change sm_license_count on a save if it doesn't match the Assignment count, but it will not allow me to add or delete Assignments. I have a method that will make the update, but the sm_ITA has to be saved twice. Thanks for any help that can be provided of what I am missing. Will Update Value - sm_ITA Server Event onBeforeUpdate - Doesn't allow changes, additions, or deletions to Assignments Won't Update - sm_ITA Server Event onAfterUpdate this.fetchRelationships("sm_ITA_Assignment"); Item RelationshipsItem = this.getRelationships("sm_ITA_Assignment"); string count = "" + RelationshipsItem.getItemCount(); this.setProperty("sm_license_count", count); return this; Item ITA ("edit") - onBeforeUpdate & onAfterUpdate - Returns an error of "An item with the same key has already been added." Item ITA ("get") - onBeforeUpdate & onAfterUpdate - Does nothing var ITA ("edit") - onBeforeUpdate & onAfterUpdate - Returns an error of "An item with the same key has already been added." var ITA ("get") - onBeforeUpdate & onAfterUpdate - Does nothing Innovator inn = this.getInnovator(); int currentValue = Int32.Parse(this.getProperty("sm_license_count")); Item relItm = inn.newItem("sm_ITA_Assignment", "get"); relItm.setProperty("source_id", this.getID()); relItm = relItm.apply(); int totalCount = relItm.getItemCount(); // Number of entries in sm_ITA_Assignements string count = totalCount.ToString(); if(currentValue != totalCount) { Item ITA = inn.newItem ("sm_ITA", "edit"); // have tried with get ITA.setID (this.getID()); ITA.setProperty ("sm_license_count", count); ITA = ITA.apply(); } return this;Solved3.9KViews0likes5Comments