Forum Discussion
Change Document Set Welcome Page Default View
Hi Thomas,
DocSets' API is limited in CSOM. It's not possible to change most of the settings.
Last time, when I faced DocSets provisioning I ended up with a hack to send emulation of user clicks on a settings form to achieve code based provisioning of DocSet settings.
- Thomas GielissenJan 23, 2017Copper Contributor
**bleep**..., I kinda expected this answer already, never the less i'm still disappointed :(
The "emulation of user clicks" hack looks really dirty, but then again I don't see another way.
Do you still happen to have the code?
- DeletedJan 23, 2017
yes i know it is hard but made a blog for it:
https://docs.com/paul-keijzers/4594/unable-to-change-view-of-list-view-web-part-csom
https://docs.com/paul-keijzers/5882/change-documentsetpage-using-csom-office365
- Thomas GielissenJan 23, 2017Copper Contributor
Hi Paul,
I'm going through your code, If I understand it correctly until now, what you are actually just doing is
- Modify the document set welcome page via the limited webpart manager
- Remove/close the default "document set contents" webpart, which will show only documents in the current document set. This is not an XSLTListViewWebPart zo in the webpart properties, the desired view can not be configured.
- Add an xslt list view webpart. Doing this, a new view is created in the list specifically for this webpart.
- Modify this "webpart view" that has been created in the list as desired.Nice workaround! I'm going to fit it to my needs, and I'll post an update later to confirm this solves my problem!
Thanks for the feedback!
Regards,
Thomas