venerdì 24 febbraio 2012

[SharePoint 2010] SharePoint and Cross Site LookUp fields

When developing a large SharePoint project you may need a cross site lookup field and usually first thing you do is rush to google and search for someone who had the same problem as you and resolved it creating a custom field type and sharing source code. Today I hope to say something that could help someone to better use his time :)

I recently discovered that SPFieldLookup object comes cross site out of the box, even if SharePoint 2010 web user interface doesn't show this. You can  obviously use object model to create a lookup field that retrieves values from a list residing in a SPWeb that's not the SPWeb your lookup field lives in.

Below you can see a working example:

1 commento: