When I display the List in the Datasheet-View the Lookuplists were empty.
I found out that opening the field in the List-Settings and saving it again solve the problem.
So I compared the field object before and after saving it using the SharePoint Manager 2010.
The difference was the value of LookupField.
After adding this to my code:
spList.Fields[$fieldName].LookupField = "Title"
it worked fine.
Keine Kommentare:
Kommentar veröffentlichen