Monday, December 10, 2012

Lookup in Lists Programatically


some times lookup column doesn't work , i spent long time and finally i  tried this chunk of code and looku work fine .

when using visual studio take care when write atteibute of lookup
field being in this order

<Field ID="c290b4ee-5c63-4dd7-b31c-f5252770c507"         Type="Lookup"         DisplayName="Company Name"         List="Lists/Companies"         Overwrite="TRUE"         PrependId="TRUE"         Required="TRUE"         Hidden="FALSE"         ShowField="Title"         EnforceUniqueValues="FALSE"         UnlimitedLengthInDocumentLibrary="FALSE"         SourceID="~sitecollection"         WebId="~sitecollection"         StaticName="CompanyName"         Name="CompanyName"         Group="Rashpetco Columns" />


===============================
Note ID without curly brackets

No comments:

Post a Comment