Provisioning of the Feedback list and other resources

At the beginning of the chapter, we created the feedback list at the root of a SharePoint Online site collection. We did this using the user interface. There is nothing wrong with that, unless you need to create dozens or even hundreds of lists. In that case, the provisioning of the required SharePoint resources should be automated. Many SharePoint professionals will script the creation of lists even when they only need a few them. It is good practice because it is less error-prone and you can easily delete everything and recreate it while developing the solution.

Currently, the main approach to provisioning is called remote provisioning, as mentioned in the first chapters. In remote provisioning, a code, which is usually a PowerShell script but can be also native C# application of any type, creates the required lists and other resources when the administrator wants them to be created, or in scheduled manner, or as part of another provisioning operation. For example, whenever site collection is created via remote provisioning, we could hook the creation of our feedback list generation onto the provisioning code as well.

Instead of remote provisioning, our code in the web part could check if the feedback list has already been created and if not, it could create the list and the custom columns. It is not bad practice, but it requires that the user who is the first to write feedback has permissions to create the list on root site level. That might be the case anyway, as the web part is usually added to the page by the site owner. Even if it added by a normal user and the list creation fails, we could simply instruct the user to contact an administrator.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.129.19