Forum Discussion
christopher_gillis
8 years agoCommunity Manager
Hi Martin,
The easiest way to accomplish this would be to add an Item Action to the Project Documents relationship ItemType. Item Actions will automatically be added to the Right-click menu of the relationship grid.
You can then look up the value of the selected cell using code like the sample below.
Christopher Gillis Aras Labs Software Engineer
// Get the grid
var relationshipsId = window.relationshipsControl.currTabID;
var relationshipsFrame = window.frames[relationshipsId];
var gridApp = relationshipsFrame.contentWindow.gridApplet;
// Get the value of the selected cell
var selCell = gridApp.getSelectedCell();
var cellValue = selCell.getValue();
Please note that there is currently a bug filed with the getSelectedCell() method where it returns incorrect results if the relationship grid displays a mix of properties on the related ItemType as well as on the relationship ItemType.
Chris
Christopher Gillis Aras Labs Software Engineer