In this PnP Web Cast we concentrated on so called “property bag trick” with CSOM or REST to adjust and change additional settings in site or in list level. This is something which we have mentioned few times in the PnP Yammer group discussions, but have never truly covered in guidance or in any of the previous videos.
“Property bag trick” means alternative way to adjust some of the list or site properties by directly manipulating them in the property bag of the particular object. In many cases when you update properties in these objects, those values are stored in the property bag of the object, rather than truly stored as separate property. Good example is SPWeb.NoCrawl property, which simply stores the current value to SPWeb.Properties collection for internal usage. NoCrawl property however was introduced also to updated CSOM package with the 2015 December Nuget release, so that’s no longer needed, but is good example of the oob behavior and pattern.
By using the property bag trick approach you can possibly overcome critical business requirements even though needed properties or capabilities are not specifically exposed using CSOM. Good example of these kind of settings are following.
- Configure available page layouts and site templates for publishing site
- Configure list rating settings for a list in publishing site
- Configure property bag entries to be crawled by search – See this blog post
- Configure records management settings in list level
Presentation used in this web cast is available from http://docs.com/OfficeDevPnP.
See following links for additional details around covered topics.
- Core.ListRatingSettings – PnP sample used in the video for enabling rating in lists at publishing sites
- Provisioning.PublishingFeatures – PnP sample showing how to adjust additional publishing site settings using CSOM with the property bag trick model
- PnP Core Component – Extension methods for the CSOM to enabled additional capabilities with CSOM object model – usable as Nuget package directly from Nuget gallery
What is Office 365 Developer Patterns and Practices (PnP) web cast series?
We have started this weekly Office 365 Developer Patterns and Practices (PnP) web cast series to cover different patterns, practices and topics around development with Office 365 and SharePoint. Majority of the topics are valid for the Office 365 and SharePoint on-premises. Our objective is to release new around 30-45 minute long web cast each Monday with few slides and live demo on the covered topic. All web casts are published at the PnP Channel 9 video blog with additional references on the existing materials.
PnP is community driven open source project where Microsoft and external community members are sharing their learning’s around implementation practices for Office 365 and SharePoint on-premises (add-in model). Active development and contributions happen our GitHub project under Dev branch and each month there will be a master merge (monthly release) with more comprehensive testing and communications. Latest activities and future plans are covered in our monthly community calls which are open for anyone from the community. Download invite from http://aka.ms/OfficeDevPnPCall.
This is work done by the community for the community without any actual full time people. It’s been great to find both internal and external people who are willing to assist and share their learning’s for the benefit of others. This way we can build on the common knowledge of us all. Currently program is facilitated by Microsoft, but already at this point we have multiple community members as part of the Core team and we are looking to extend the Core team with more community members.
If you have any questions, comments or feedback around PnP program or this blog post, please use the PnP Yammer group at http://aka.ms/OfficeDevPnPYammer.
“Sharing is caring”
Vesa Juvonen, Senior Program Manager, Office 365, Microsoft