Related items: child-grandchild

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

06 Apr 2017

Hi, I have a form based on three lists with parent-child-grandchild relations.
A - parent
B - child for A
C - child for B (grandchild for A)
I had the following scenario which works fine:
B is set up as a related item on the Edit form of A via non-grid related control. C is set up as a related item on a new B form populated via in-grid related control. In this scenario everything works fine: all the IDs are populated correctly.
But after the fist production run of the form business said I need to set up C the same way as B: populated via non-grid related control. I was trying to follow both instructions in these two articles (they are slightly different):
https://spform.com/related-items/creati ... ms-control
https://spform.com/documentation/relate ... gular-mode
But it doesn't work: the ID for C list item is just not coming up. Any help would be highly appreciated! Thank you!

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

07 Apr 2017

Hi Katy,
I would not recommend you editing lists via two dialogs since by default SharePoint refreshes the main window after submitting a dialog even if it was a grandchild item.

But you can try getting parent's ID this way:
var parentID = fd.getSourceID();

Instead of this (this code retrieves an ID of the main window:):
var parentId = window.top.GetUrlKeyValue('ID');

Katy
Posts: 145
Joined: Wed Dec 02, 2015
Location: Canada

10 Apr 2017

Thank you, Dmitry. I'll try to convince business that the table is fine :-)

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests