Forum Discussion
christopher_gillis
8 years agoNew Member
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 EngineerARAS_User
5 years agoIdeator I
Is it possible to open a custom HTML page in a new window by passing context item as argument?