SetCustomProperty not working for field

Mar 8, 2011 at 2:39 PM


I'm trying to add a filtered lookup field to a list using AddFieldAsXml however the custom properties are getting lost. To get around this I am trying to use SetCustomProperty for the know property names that the filtered lookup field uses however when the field Update() is called these are lost. I dont want to link against the dll - thus the reason for going the GetCustomProperty/SetCustomProperty route.

Tracing through the code I think the problem is in the methods UpdateFieldProperties and GetFieldThreadDataValue. It looks like the Update code is always going to pull the value from the thread regardless of how the SPField OM is being used, but the thread value will only be set if the setters have been used.