Project Description
This tool was developed to reassociate or fix SharePoint lookup fields to lists in a site.

This tool is able to:
1. Relink lookup fields
2. Relink multiple lookup fields from an XML definition (Bulk tasks)
3. View Field Schema

This tool is useful in the following scenarios:
1. A list a lookup field is pointing to has been deleted and needs to be linked to a different field in a different list
2. A site backup is made and is restored in a different environment - The lookup fields will no longer link to
the field even thought the appropriate lists may be created. This tool will help relink the fields

Requirements for this tool to run:
1. Must login as Site Administrator - as the code will delete the lookup field and recreate it (Did not use RunWithElevatedPrivileges() for security purposes.)
2. Tool must be run on a WSS v3.0 or MOSS 2007 Server directly
3. Sorry, this tool has only been tested on an English environment - but theoretically should still work
with other localisations of SharePoint instances.

This tool was used as part of a migration plan across servers using site backup and restore. The restored site ended up with lists that had lookups that did not associate with the appropriate columns. This is because the ID of the list in the new environment is different after a restore. Therefore the stored lookup field definition will no long be validly pointing to the correct ID of the list column that it was associated with - hence the need for this tool to reassociate such lookup fields with the relevant list columns that it references from.

Hopefully this little tool could help save alot of pain in migrating lookup fields in lists.

Please add suggestions of how this tool could be improved in the Issues Tracker.

For more information, checkout the blog posts:

Thank you,
Douglas Leung

Last edited Feb 21, 2009 at 5:15 AM by dougleung, version 6