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();

Reply
  • 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();

Children