Targeting Element on Form from Relationship Grid

Hello All,

I'm making a relationship grid event that fires on a row selection.  It's meant to target an HTML control on the top item form and then will fill it with a TGV.

Trouble is, I'm running in circles trying to target the element on the form, which is called 'tgv'.

Lots of debugger tries in the console and methods and nothing is finding it.

Have tried...

top.mainWindow.document.getElementsByName("tgv")[0];
top.mainWindow.document.querySelector('div[name="tgv"]');

parent.document......

Any thoughts or help?

Parents
  • The TGV from my POV is not rendered as classic HTML, but is dynamically built. It seems that we cannot access the buttons inside the TGV with "querySelector" or similiar.

    The refresh button is a CUI element and uses following code:
    -> inArgs.contextParams.tgvContext.reload();

    inArgs typcially comes with the CUI call, so it´s empty when we come from something else.Maybe we can use the available function somehow, but I am not sure.

    One simple solution that I have found is, just to reload the frame that is used for the TGV in the Form. But it will reload everything, incl. TGV toolbar:

    const x = document.getElementById('xy');
    x.contentWindow.location.reload();

  • 0 オフライン in reply to AngelaIp

    Hey Angela, thanks.  I may have not explained correctly.  I'm just trying to sort out how to target the HTML control on the Item form from the relationship grid.  Any combo of the various selects, when fired from the relationship grid, don't seem to be able to find the element by name.

    I believe that the method we have will do what we need it to with the TGV since replaces the iframe contents.  We're using the same approach in a 'two column' form which has two side by side TGVs that update/change out depending upon buttons or actions.

    Does that clarify?

  • Ah I see! You come from the relationship, while I did my tests from a Form button. I don´t have an answer know, but I will check. I am interested in this one too.

Reply Children
No Data