This topic has not yet been rated - Rate this topic

SPFieldLookup.LookupList Property

Windows SharePoint Services 3
Gets the GUID of the list to use for the lookup.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public string LookupList { get; set; }

Property Value

A GUID that identifies the foreign list.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Read only question
This can be set when you are creating a field, but not once that field is part of a list.
It converts the string to a GUID, but the property expects a string.
Property can be set
If you set the property with a Guid.ToString() it works. Like this:

SPFieldLookup lookUpField = (SPFieldLookup)list.Fields.GetField(fieldName);
lookUpField.LookupField = lookupFieldInternalName;
lookUpField.LookupList = lookUpSourceList.ID.ToString();
lookUpField.Update();
Property is read only
This property cannot be set even though the above seems to indicate that it can.
Question...
This property appears to be a string is there a reason why it's not of type guid?