How to add restrictions to aras.vault.selectFile() file picker
Hi community, I currently design a custom form with a button that calls a regular file picker. In my scenario, end users shall only be able to upload certain datatypes, like txt and xml. As the affected users group does not have any edit rights for items, I have to upload the Files to the Vault and link them later to the correct items by a Server Method. As this approach directly throws files into the Vault, I want to ensure that only the right files can go through. What´s the best way to add restrictions to the file picker? var vlt = aras.vault; vlt.selectFile().then( function (fileObject) { if (fileObject.size > 1000 || fileObject.type != "text/xml" ) { return alert("This file can´t be right") } var fileItem = inn.newItem("File","add"); fileItem.setFileName(fileObject); fileItem = fileItem.apply(); var fileId = fileItem.getID(); // do something with the file } ); I have noticed, that the fileObject contains the mime type, file size and other file properties that I can use for a later filtering. It´s even possible to read the hex file signature, which maybe helps to prevent faked files. But I wonder if I can directly pass a filter to the file picker, so users can only select certain file types from the start. This way my lnnovator would not get in touch with invalid fileObjects at all. Thanks for sharing your ideas! AngelaSolved13KViews1like12Comments- 8.7KViews0likes7Comments
Callback not working properly if I dont have debugger in my javascript code
I have added a popup on button click on the mpp_OperationQuickEdit Form which opens form with a single relationship which I have created.It works like the 'Launch AML Editor' action on MCOs.I have added a save changes button which adds or remove relationships based on relationship added or removed.Then a callback function is provided.the relationships are added or removed successfully but the problem is that the callback works fine if I have put debugger in my javascript code otherwise it just closes both the forms the new popup and the quickEdit form.What could be the problem?6.4KViews1like12CommentsHow to close relationship search dialog box dynamically?
Hi Team, I have custom result binding code on 'OnSearch' event. On return of result if it is true it works fine but on false I want to close search dialog box that appear in relationship on click of pick related dynamically. I tried following method but it is not working. parent.dialog.close(); Any one can please help how to achieve this? Thanks & Regards Gaurav6.4KViews0likes3CommentsHow to reference the ItemType in the current tab in a Dialog box?
I'm working on a client side method to clone an ItemType using a dialog box. My approach is to make a form with a check box to choose to copy properties and another check box to copy values from a relationship tab, and a button for "Done" and "Cancel." Then opening that form inside a dialog box that's opened from a menu button. My problem is referencing the ItemType in the current tab from the dialog box. I tried adding the item as an argument to the dialog using the 'item' tag, but using document.thisItem returns 'undefined' for me.5.1KViews0likes1Commentaras.confirm dialog - Are there any alternatives or updates to improve the lock&feel?
Hi Community, I use aras.confirm() to get user confirmation before executing some onClick button events. The regular aras.confirm() mainly reuses the standard Javascript confirm() function and doesn´t really blend into the layout. The confirm dialog (in Innovator 12) more locks like a browser related error message and not like an Innovator object. It's not very aesthetic and would like to have something that looks nicer.[emoticon:44a8a53ad3364ea78a16c5a3229f75bb] Does anyone know an alternative confirm option? We of course could build our own custom dialog. Or even better: Integrate some custom designs straight into aras-objects.js But maybe someone can recommend me an existing solution, that I might not have seen yet? I know that Aras right now reworks the UI styling in each new Innovator version. So I am not sure if a custom solution for this one is actually necessary anymore. Does anyone know if confirm messages has been enhanced already? And if yes, in which version? (14,15,16,17,18,19,20?) There are some dialog related topics on the roadmap and they even fixed a bug in the prompt dialog. But I am not sure if there are any plans regarding confirm dialog. Thanks for any hint! Angela2.5KViews0likes2Comments