Question

I am adding custom lists programmaticaly from a custom template. I check to see if the custom list template exists, and if not I create the list template by creating a list and then saving it as a template using the SPList.SaveAsTemplate() method. However, during the same timer job, I try to get the list template, but it doesn't show in the SPSite.GetCustomListTemplates() method. It does however show in the UI under the List Template Gallery. Any idea as to why it would show in the UI but not be returned in the method call?

Was it helpful?

Solution

Read my answer to this question. With that you should get a result from GetCustomListTemplates instead of just an empty list.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top