Sharepoint 2013 REST API: create list view with listviewXML

Copper Contributor

Hi All,

 

I want to create a view using the list view xml but it is not working. Anyone can give a example code that I can learn from?

Here is the code I tried:

"ListViewXml": "<View Name=\"{30C488EB-692E-4C8B-A70A-8D68AFDAF0B3}\" MobileView=\"TRUE\" Type=\"HTML\" DisplayName=\"test\" Url=\"/Lists/felixtest/test.aspx\" Level=\"1\" BaseViewID=\"1\" ContentTypeID=\"0x\" ImageUrl=\"/_layouts/15/images/generic.png?rev=44\" ><Query><GroupBy Collapse=\"TRUE\" GroupLimit=\"50\"><FieldRef Name=\"Title\" /><FieldRef Name=\"AppAuthor\" Ascending=\"FALSE\" /></GroupBy><OrderBy><FieldRef Name=\"ID\" /></OrderBy></Query><ViewFields><FieldRef Name=\"LinkTitle\" /></ViewFields><RowLimit Paged=\"TRUE\">40</RowLimit><Aggregations Value=\"Off\" /><ViewStyle ID=\"13\" /><JSLink>clienttemplates.js</JSLink><XslLink Default=\"TRUE\">main.xsl</XslLink><Toolbar Type=\"Standard\"/></View>"

0 Replies