Uncategorized

Changing the Lookup field List ID in Template File(.STP)

When you save a List as template(STP file) that has a lookup column referring to another list, and if you copy the template to another site then you need update the List ID in manifest.xml file to your new list id.

  • To do this copy the Lookup List guid ID to a notepad
  • Rename the .STP file to .CAB
  • Double click the cab file and copy the elements.xml to local folder
  • Open the elements.xml file in Notepad
  • Search for the Lookup field and change the List attribute to the new lookup list id.
  • To copy the Elements.xml file back to the CAB file
    • Browse to the folder c:\windows\system32 and type makecab c:\yourfolder\elements.xml c:\cabfoldername\mylist.cab
  • This command will push the Elements.xml file to the cab file.
  • Rename the new cab to .STP extension
  • Upload the file to the list templates folder in your website

That’s it. Done.

Advertisements