Set LookupViewId programmatically


I'm using this field in a site definition and it works ok, however I'm struggling to set the LookupViewId programmatically. I've retrieved the Guid of the view from the list I'm looking-up but when I try to save the value to the ExtendedLookup field, it doesn't get saved.
I've tried both doing a find/replace technique using SchemaXml and the SetCustomProperty method.
Please help?


mparter wrote Mar 9, 2009 at 12:06 AM

Got it sorted. Had to use ExtendedLookupField.Save first of all passing in the Guid of the view I want to use and then calling ExtendedLookupField.Update.

wrote Feb 13, 2013 at 1:46 AM