How to open a Item in a new Window instead from a Form

Hi, I have a simple dialog form that contains a button that adds and opens a new Document Item. Unfortunately the new Document is not accessibly while I am still in the dialog. The Documet is added as new Aras tab in the background. Is it possible to display the Document in a new window in the front so user can edit the Document while still using the dialog? If I click the button, the following Method is called:
// Create new Document var docItem = innovator.newItem("Document","add"); docItem.setProperty("item_number", "DOC-1234"); docItem.setProperty("description", "testtext"); var resultItem = docItem.apply(); var docId = resultItem.getID(); top.aras.uiShowItem("Document", docId);
I tested the following command for opening my Document in a new Form ->top.aras.uiShowItemInFrameEx(window, resultItem, "view", 1,formNd ); But with this option I am only able to open the bare Document Form without the Relationships. But I need to display the whole Item, including the Relationships. Thanks and best regards! Angela  
  • Hi Angela, This can be accomplished by passing the appropriate arguments to the aras.uiShowItemEx() function. Using this function, you can both open an item in a tab and set the focus to that tab or open the item in a completely new tearoff window. Please see the example below for a description of how to use this function.
    var innovator = this.getInnovator();
    // Get the Document item
    var docItem = innovator.newItem("Document", "get");
    docItem.setProperty("item_number", "Test");
    docItem = docItem.apply();
    /* uiShowItemEx takes in 4 parameters
    * 1) itemNode - The item to be displayed
    * 2) viewMode - The view to be used (This is typically always "tab view")
    * 3) openInTearOff? - Whether to open the item in a tab or a tearoff window
    * (true will open in a tearoff, false will open in a tab)
    * 4) unFocused? - Whether to set the focus on the new item form
    * (true will open the form in the background, false will set the focus on the new form)
    * Comment out one of the lines below based on how you want to open the item
    // This will open the item in a new tab and set the focus on that tab
    top.aras.uiShowItemEx(docItem.node, "tab view", false, false);
    // This will open the item in a new window. New windows will always have the focus set to them
    top.aras.uiShowItemEx(docItem.node, "tab view", true, false);
    Chris __________________________________ Christopher Gillis Aras Labs Software Engineer
  • Hi Chris, Perfekt, just what I have been looking for! Copy-paste is my favourite way of solving a problem! Thanks! Angela
  • Is it possible to open a custom HTML page in a new window by passing context item as argument?