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://doc.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
If you have any feedback or comments related on this web cast, please use the Office 365 Developer Patterns and Practices Yammer group to provider your input. Thx for your interest advance.