Connect to List in other Site Collection

Apr 23, 2009 at 8:06 AM
Hi,

first of all: thanks for your work.

Is it possible to connect to a list in another Site Collection?
My case: When loading the Site Collection all Sharepoint lists are present in the dropdowns, and I am able to select the columns I want to refer to. When clicking ok, the following error message appears:
"Value does not fall within the expected range."

Thanks for any help.


Coordinator
Apr 23, 2009 at 1:25 PM
This should be possible typing in the url of the list. Are you getting error in event log?
Feb 17, 2010 at 2:01 PM

Got the same problem.

Tried to write in list's url, and site-collection url - same result. It fails with "Value does not fall within the expected range".

And I cannot find any error message in sharepoint log about it.

Feb 19, 2010 at 9:43 AM

Got it using reflrector:

ConnectedLookupFieldEditor.cs, in method 

public void OnSaveChange(SPField field, bool bNewField)
{
	...
	field2.LookupWebId = web.ID;
	...
}

It fails because of check in base class SPFieldLookup:

public Guid LookupWebId
{
    ....
    set
    {
        if (((base.Fields != null) && (base.Fields.Web != null)) && ((base.Fields.Web.ID != value) && (base.Fields.Web.Site != null)))
        {
            // surely it is not here, because our SideID is in other site collection 8(
            base.Fields.Web.Site.AllWebs[value].Close();  
        }
        base.SetFieldAttributeValue("WebId", value.ToString());
    }
}

Coordinator
Feb 19, 2010 at 2:57 PM

Any suggestions?