Lookup with Picker Provisioning

May 4, 2011 at 11:50 AM
Edited May 4, 2011 at 11:50 AM


is it possible to provision (<Field> in elements.xml) a lookup with picker field?  What properties are available (List and field to lookup, etc...) ? 

PS: I'm using the 2007 version btw.

Jun 20, 2011 at 5:40 PM

Hi, I'm also looking for a solution to deploy this stuff for SP2010 with custom settings. I need to build a wsp that can be deployed to different DEV/QA/PROD systems.
This will give me different IDs for the LookupWebId and the GUIDfor the LookupField so I'm not able to configure these properties in the 

I like to create a list definition and specifiy the picker in the Schema.xml of the list definition. Tried code like this

<Field ID="{BEFA6201-079E-472C-AADA-A409B10B983A}" Name="LCIDLookup" StaticName="LCIDLookup" DisplayName="My Language Lookup" Type="LookupFieldWithPicker" Required="FALSE" EnforceUniqueValues="FALSE" ShowField="Title" UnlimitedLengthInDocumentLibrary="TRUE" RelationshipDeleteBehavior="None" SearchableFields="Title,ISOCode" tempDependentLookups="Title,ISOCode" BaseRenderingType="Lookup" />

and the added the stuff to the fieldref section

<FieldRef ID="{BEFA6201-079E-472C-AADA-A409B10B983A}" Name="LCIDLookup" DisplayName="My Language Lookup" Required="TRUE" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE"></FieldRef>

This does not work because the field section does not contain the properties for LookupWebId and LookupField. After deployment I receive an exception that means the properties are missing. If I provision the properties with dummy values  (--> GUID.Empty) I'm also not able the get instances of the field working. Changing the properties by C# code in an feature after deployment does also not work.

What is the best way to configure the field before/after provisioning?

Thanks in advance