none
Create list using custom template using the client object model RRS feed

  • Question

  • I'm trying to create a nwe document library using a list template. I've created the list template and saved it to list template gallery.

    This is the code I'm using to create the library:

    listTemplate lt = listTemplates[0];
    listCreate.Title = name;
    listCreate.Url = url;
    listCreate.Description = description;
    
    listCreate.TemplateType = lt.ListTemplateTypeKind;
    listCreate.TemplateFeatureId = lt.FeatureId;
    listCreate.CustomSchemaXml = GetCustomSchemaXml();        
    
    salesWeb.Lists.Add(listCreate);
    clientContext.ExecuteQuery();
    

    The method GetCustomSchemaXml is returning the schema, as a string, extracted from the manifest.xml file which is in the stp-file. the custom schema is the <List>-tag of that file. The error I'm getting is the same as in this thread here;

    "Server Out Of Memory. There is no memory on the server to run your program. Please contact your administrator with this problem."

    Any thoughts on what be the cause of this?

    Wednesday, January 26, 2011 11:51 AM

Answers

All replies