Forum Discussion

3 Replies

  • Hello Alexis,

    If you want to hide columns of relationship use following code.

    Hide Column:

    parent.findCurrentRelationshipsTab().document.getElementById('gridTD').children[1].getElementsByTagName('th')[ColumnIndex].setAttribute('style','display:none;');

    Show Column:

    parent.findCurrentRelationshipsTab().document.getElementById('gridTD').children[1].getElementsByTagName('th')[ColumnIndex].setAttribute('style','text-align:left;text-align:center;width:100px');

    Thanks,

    Praful Gurav

    • Kailas's avatar
      Kailas
      Ideator I

      Hi Praful, I have tried this code on onFormPopulated event but it throwing an error "Event handler failed with message: TypeError: Cannot read properties of undefined (reading 'getElementsByTagName')" 

      I am using ColumnIndex value [1] 

      While debugging code i was getting error as undefined for below code:

      parent.findCurrentRelationshipsTab().document.getElementById('gridTD').children[1]

      Thanks,

      Kailas

  • Hello Alexis,

    Attach your method on change of dropdown box property event.  

    please find the below code to hide/show the relationship tab

    //based on your condition (dropdown box value)  set 0 or 1 in below code

    //0-means hide the relationship

    //1- means show the relationship.

    parent.relationships.relTabbar.setTabVisible(top.aras.getRelationshipTypeId("your_relationship_name"), 0);

     

    Regards,

    Suhas