LookUp for Site Definition in SharePoint.
Suppose we have created a site definition for an existing Site having two lists and one of the lists uses a lookup column that points to the other list.
Now if we are creating site using that site definition we will find our lookup column missing in the list.
If we check the schema.xml for our list, we will find our lookup field to be commented.
To get it working , we need to define the field in the following manner
Original
<Field Type="Lookup" DisplayName="myLookUp" Required="FALSE" List="{72424dd2-9030-408a-97c9-8482d9d81204}" ShowField="Title" UnlimitedLengthInDocumentLibrary="FALSE" ID="{f50277a0-4da5-46d3-8e60-284c729a3eb8}" SourceID="{07e7832d-45df-4f69-b5bb-e31c5107c5ca}" StaticName="myLookUp" Name="myLookUp" ColName="int1" RowOrdinal="0" />
It should be modified to
<Field Type="Lookup"
DisplayName="myLookUp"
Required="FALSE"
List="Lists/SecondList"
ShowField="Title"
ID="{f50277a0-4da5-46d3-8e60-284c729a3eb8}"
StaticName="myLookUp" Name="myLookUp" ></Field>
SecondList :- The name of the other list.
Check this wonderful post
Bye…
Filed under: MOSS, SharePoint Tagged: SharePoint
This was originally posted here.

Like
Report
*This post is locked for comments