Expand Minimize

Best Practices

Best Practice rules check managed client side object model code.

Index

Rule Description Type Severity
SPC02900: Use AddFieldToContentType to add fields to content types PnP has an implementation to add fields to content types. Assembly Warning
SPC029001: Use AddWebPartToWikiPage to add WebParts to Wiki Pages PnP has an implementation to add web parts to wiki pages. Assembly Warning
SPC029003: Use ContentTypeExistsbyId or ContentTypeExistsByName to check if content type exists PnP has an implementation to check for existence of content types. Assembly Warning
SPC029004: Use CreateContentType to create content types. PnP has an implementation to create content types. Assembly Warning
SPC029005: Use CreateField to create fields. PnP has an implementation to create fields. Assembly Warning
SPC029006: Use CreateList to create lists. PnP has an implementation to create lists. Assembly Warning
SPC029007: Use CreateView to create views. PnP has an implementation to create views. Assembly Warning
SPC029008: Use GetListByUrl to get lists by URL. PnP has an implementation to get lists by URL. Assembly Warning
SPC029009: Use GetWebParts to get webparts. PnP has an implementation to get webparts. Assembly Warning
SPC029010: Use SetDefaultContentTypeToList to set the default content type. PnP has an implementation to set the default content type. Assembly Warning
SPC029011: Use UploadFile to set the upload files. PnP has an implementation to upload files. Assembly Warning
SPC029012: Use UploadFileWebDav to set the upload files via Web Distributed Authoring and Versioning. PnP has an implementations to upload files via WebDav. Assembly Warning
SPC029013: Use AddJsLink to set and add a JS Link file. PnP has an implementations to add JS Link files. Assembly Warning
SPC029014: Use AddJsBlock to set and add a JS block. PnP has an implementations to add JS blocks. Assembly Warning
SPC029015: Use SetDefaultColumnValues to set default column values. PnP has an implementations to set default column values. Assembly Warning
SPC029016: Use EnsureProperty/EnsureProperties to ensure a property is loaded. PnP has an implementations to ensure properties are loaded correctly against the object. This process is also optimised to minimise calls. Assembly Warning
SPC029017: Use ExecuteQueryRetry to ensure SharePoint isn't saturated with requests. PnP has an implementations to retry execute queries in a safe retry loop that prevents requests being rejected. Assembly Warning
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.