I have a list and a document library (List A and document library B), both opens in dialog.
Document library B has a lookup column targeting list A. On the display form on List A the document webpart from document library B is added (Parent-child relation).
Now I need it to auto fill the lookup column with the ID of the item from list A. This works perfectly fine as long as list A does not open in dialog, but i need it to work in dialog as well.
How do I get the ID of the "second dialog" dialog other than the active one?
I have tried both window.parent.location and window.top.location both only returns the url from the main page (Eg. list view) which of cause does not contain the ID I'm looking for.