How to pass context id of calling element to custom HTML or TOC view in new tab?

Hi community,

is any one familiar with opening custom HTML pages or Forms in a new tab? I right now work on something similar as shown in this blog article:

https://community.aras.com/b/english/posts/displaying-html-in-aras-innovator

The article describes how to open a html page in a custom tab as alternative to a pop-up dialog.
In my case I open a custom Form instead of the html page, but it basically the same concept.

Does any one know how to pass custom parameters to the html page / opened Form?

When we just open the Form as regular pop-up dialog, we can pass the context item and custom parameters within the parameters block just as shown in the code sample.
But how do we pass the context item or other properties to the html page? The blog article unfortunately doesn´t cover this detail.

Would be happy if anyone has an idea or hint that could work!

Thanks for any help!

Angela

Parents
  • Hi community,

    I guess nobody can follow what I try to solve here. I will try anyway. 

    One ugly solution is to wrap the context item id into the window name and then later extract it from the tab. Something like this:

    ---
    // Get current id
    var currentItemId = document.thisItem.getID();

    aras.uiOpenEmptyWindowEx(newItem.node);
    var newWindowName = aras.mainWindowName + "_" + newItemId + "context" + currentItemId;

    ---

    But I really don´t like this variant. I would prefer a variant where I can pass my item within the call:

    var newWindow = aras.windowsByName[newWindowName];
    newWindow.frameElement.src = "./test.html";
    newWindow.frameElement.myItem = document.thisItem;

    Unfortunately this one didn´t work. I weren´t able to pass custom variables to the frameElement. If I want to do, I would have to modify the codetree file behind it to allow my own properties to be passed. Which I also don´t want to do. 

    There has to be an easier solution...

Reply
  • Hi community,

    I guess nobody can follow what I try to solve here. I will try anyway. 

    One ugly solution is to wrap the context item id into the window name and then later extract it from the tab. Something like this:

    ---
    // Get current id
    var currentItemId = document.thisItem.getID();

    aras.uiOpenEmptyWindowEx(newItem.node);
    var newWindowName = aras.mainWindowName + "_" + newItemId + "context" + currentItemId;

    ---

    But I really don´t like this variant. I would prefer a variant where I can pass my item within the call:

    var newWindow = aras.windowsByName[newWindowName];
    newWindow.frameElement.src = "./test.html";
    newWindow.frameElement.myItem = document.thisItem;

    Unfortunately this one didn´t work. I weren´t able to pass custom variables to the frameElement. If I want to do, I would have to modify the codetree file behind it to allow my own properties to be passed. Which I also don´t want to do. 

    There has to be an easier solution...

Children
No Data