0

I need to create a custom list template in Visual Studio. Creating the schema for this is quite a task if you have to type in all of the fields. I remember a demonstration where someone created a list in the browser and then made it a list template so that he could use the xml it created for his VS deployed list template. Then, he found the actual xml schema file containing the field definitions and copied and pasted them into his new schema file and changed the guid values for each field as is necessary.

After creating my list template in browser, I can't seem to find any list template that matches the name of the one I created in the browser in the features folder under the root. Where is the schema for this?

1 Answer 1

1

You can get the XML schema of any list by using the owssvr.dll call:

http://{0}/_vti_bin/owssvr.dll?Cmd=ExportList&List={1}

{0} – The URL to your site. This could be the root web or a child site.
{1} – The GUID of your list.

3
  • Doesn't seem to work and says error, cannot complete this action. My list is in the root site and is called ListTemplateSetUp. I tried myDomain/_vti_bin/… and I tried adjusting the path by adding a leading Lists to the list url. myDomain/_vti_bin/owssvr.dll?Cmd=ExportList&List=Lists/…
    – Bobh
    Commented Mar 15, 2019 at 17:41
  • I thought that there must be an xml file that lives somewhere under the root folder.
    – Bobh
    Commented Mar 15, 2019 at 17:43
  • Actually, I added the name instead of guid. Used guid and it worked.
    – Bobh
    Commented Mar 15, 2019 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.