Forum Discussion
Document Library "New" menu changes via code
- Mar 18, 2019
For anyone else looking I managed to find it. In CSOM there's a property "NewDocumentTemplate" which takes a JSON structure.
view.NewDocumentTemplates = itemtoset;
view.Update();
await ctx.ExecuteQueryAsync();See https://petkir.wordpress.com/2018/10/26/change-new-menu-in-sharepoint-online-programmatically/
The same can be set via PNP Provisioning by setting NewDocumentTemplates as part of the default view definition.
Cheers
Andy
For anyone else looking I managed to find it. In CSOM there's a property "NewDocumentTemplate" which takes a JSON structure.
view.NewDocumentTemplates = itemtoset;
view.Update();
await ctx.ExecuteQueryAsync();
See https://petkir.wordpress.com/2018/10/26/change-new-menu-in-sharepoint-online-programmatically/
The same can be set via PNP Provisioning by setting NewDocumentTemplates as part of the default view definition.
Cheers
Andy