Display Relationship data in a form

Hello, I would like to create my custom print view for an Item, for that i created a form triggered on the print event, but i would like to display in addition of the regular fields of the item, all the related items from its relationships. Any ideas on how i can do that? Thank you. Léo
Parents
  • Hi Christopher, Thank you for your help this was exactly what i was looking for. However i have been looking at a realy odd issues for days now : When i lock or unlock an item, if i dont open the realtionship tab of the Relationship i want to display, the aras.getRelationships(item.node, "RELATIONSHIP"); returns an empty array. For example if my item has 3 relationships tabs RELATIONSHIP1, RELATIONSHIP2, RELATIONSHIP3 If RELATIONSHIP2 tab is selected, i lock the item, close it, then open the item again i have : aras.getRelationships(item.node, "RELATIONSHIP1"); //returns array [] aras.getRelationships(item.node, "RELATIONSHIP2"); //returns array [item1,item2,...] aras.getRelationships(item.node, "RELATIONSHIP3"); //returns array [] if i then open the relationship3 tab, close the item, open it again aras.getRelationships(item.node, "RELATIONSHIP3"); will return me the related items. It looks like the related items have to be "loaded" once in the Relationship tab before i can get them in my js script. Any idea how i can solve this issue? i hope i have been clear, i can give you more infos / screenshots if needed. Thank you. Léo
Reply
  • Hi Christopher, Thank you for your help this was exactly what i was looking for. However i have been looking at a realy odd issues for days now : When i lock or unlock an item, if i dont open the realtionship tab of the Relationship i want to display, the aras.getRelationships(item.node, "RELATIONSHIP"); returns an empty array. For example if my item has 3 relationships tabs RELATIONSHIP1, RELATIONSHIP2, RELATIONSHIP3 If RELATIONSHIP2 tab is selected, i lock the item, close it, then open the item again i have : aras.getRelationships(item.node, "RELATIONSHIP1"); //returns array [] aras.getRelationships(item.node, "RELATIONSHIP2"); //returns array [item1,item2,...] aras.getRelationships(item.node, "RELATIONSHIP3"); //returns array [] if i then open the relationship3 tab, close the item, open it again aras.getRelationships(item.node, "RELATIONSHIP3"); will return me the related items. It looks like the related items have to be "loaded" once in the Relationship tab before i can get them in my js script. Any idea how i can solve this issue? i hope i have been clear, i can give you more infos / screenshots if needed. Thank you. Léo
Children
No Data