Related items: child-grandchild
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!
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!
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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');
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');
-
- Information
-
Who is online
Users browsing this forum: No registered users and 19 guests