Forum Discussion

vincent_heuvrard's avatar
8 years ago

Update RelationShip Tab on change

Hi guys ! I'm looking to refresh the current RelationShipTab (TearOff) on change detected in the form. For the event, no problem. I found how remove the tab : var tabbar = parent.relationships.relTabbar; tabbar.removeTabByLabel("Rapport");   And I think that there is some other method something like "refreshTabByLabel" existing ... If someone can help me ... (And if there is a document or a website where I could find the different method behind "parent.relationships.relTabbar" ...) Thanks a lot.

4 Replies

  • Hello Vincent, What you can do is to attach Form method to OnPopulate event:
    
    <pre>if(aras.getMostTopWindowWithAras(window).frames.relationships){// check "no tabs in tab view" 
    	var iFramesCollection = aras.getMostTopWindowWithAras(window).frames.relationships.iframesCollection;	
    	for (var tabId in  iFramesCollection) {
    		var relshipTypeNd = aras.getRelationshipType(tabId);
    		var relshipTypeName = aras.getItemProperty(relshipTypeNd.node, "name");
    		if(relshipTypeName === "{NAME OF THE TAB YOU NEED TO REFRESH") {
    			iFramesCollection[tabId].contentWindow.location.reload()
    		}
    	}
    }</pre>
    
    If your tab is standard Aras relationship it will be refreshed by Aras everytime Item Save\Refresh button pressed
  • Hi, Can you tell us what is a content of this tab:
    • Regual Relationship view
    • HTML page
  • For the moment, HTML page with some reports (HTML tables) But could be the same need with RelationShip view.
  • I tried with an another way : Reload a part of my webpage using HTML Tag like Id. One thing i don't understand : I cannot access to the dom of the bottom of the page (My webpage) from a javascript method called by an event.