Not getting selected item in search dialog box

Hello,

I have a Document relationship on Part ItemType. I have added a method on "OnBeforeNew" client event of that relationship. When I add a new relationship from the form a search dialog box gets open and it shows me all the Document item present in the system. When I select the item in search dialog box and click on the green color tick on the top right, I get the details such as id and name etc in my method but when I double click the item in search dialog box then I dont get the item details in my method.

window.parent.findCurrentRelationshipsTab().itm - This is the line of code which gives me null value when I double clicks the row in search dialog.

Please sugggest me how to get the selected item search dialog box.