문제

I would have thought this would be something I could find easily with a search, but not so far.

I have a parent/child relationship between two lists using a lookup column in the child. I have added a webpart to display a list of child items at the bottom of the parent display form, with filtering provided by configuring a connection between the display form webpart and the list view webpart.

This works well so far, but when adding a child to the list displayed it has to be manually associated with the parent. I would like to pass the lookup value of the parent to the new form of the child. Preferrably, this would be thru the standard add item menus.

What is required to do this?

In the interest of full disclosure, the child list has multiple content types, but I doubt this will cause much of a problem. It's just a matter of adding the content type GUID to the URL of the form.

도움이 되었습니까?

해결책

I've done this in the past through the use of a custom form web part. You can grab the ID from the query string, load additional attributes if needed, and then write the item(s) to the child web part. Using jQuery and SharePoint's web services makes this very easy.

다른 팁

In SharePoint 2010, use related lists and this script: http://code.google.com/p/sp2010-related-list-prefill/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top