Test environment:
Sharepoint2007 and sharepoint2010.
Application scenarios:
List Province: used to store province information. It mainly includes province locations.
List region: used to store region information. It mainly contains information about the province and the region under the jurisdiction. The province field information comes from the title (I .e. province) field of the province list.
In one sentence, two lists are associated.
Problem description:
When we provide solutions to our customers, we often migrate the dev environment to the prod environment after the dev environment is developed and tested. To improve migration efficiency, we often use list storage as a template to achieve reuse and quick website creation. In the above application scenarios, a list template containing the associated fields is used to create a list. We often find that the association relationship of the associated fields is invalid and often need to delete and recreate the list.
As shown in: get information from is blank. Real cup!
Principle Analysis:
1. * The STP template file is a cab package containing the manifest. xml file.
We use the 7-zip tool to decompress the region list template file region. STP and get manifest. xml. Use NotePad to viewCodeThe lookup field uses the guid of the list to be viewed on the target SharePoint site to define the list attribute, because a unique GUID is automatically allocated each time a list is created.
2. The list is marked with a unique guid.
Solution:
1. Export PROVINCEA. STP and regiona. STP from site.
2. Import PROVINCEA. STP to Site B and use PROVINCEA. STP to create a new list of province on site B.
3. Export the province template provinceb. STP from Site B and decompress it to view its guid.
4. Modify the guid of the province list defined by the lookup field in regiona. STP exported from Site A and set the value to the guid of the province list created in Site B.
5. Use the makecab command to generate a new region. STP, which is used to import the list template library in Site B for use.
6. As expected, success!
Below: In the future, I will sort out a specific tool set to handle SharePoint bugs.