Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

How to create List and libraries with Custom SchemaXml property using SchemaXml with CSOM in sharePoint online2010????

$
0
0

How to create List and libraries with Custom SchemaXml property using SchemaXml with CSOM in sharePoint online2010????

I am using following Code...

// Create new list for restore List Item from List Schema XML
 ListCreationInformation listCreationInformation = new ListCreationInformation();
listCreationInformation.Title = "my_List_Name";
listCreationInformation.TemplateType = int.Parse(listServTemplate);
listCreationInformation.Description = listDescription;
listCreationInformation.QuickLaunchOption = QuickLaunchOptions.DefaultValue;
listCreationInformation.CustomSchemaXml = listCustomSchemaXml;//variable to store             schemaXML as string reading schema.xml file

ctx.Web.Lists.Add(listCreationInformation);

ctx.ExecuteQuery();

It is giving an exception "Invalid list template".

I am using ClientContext for user Authentication in Client Side Object Model...

Need suitable and prompt solution...


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>