Posts

Showing posts from 2019

Powershell script to delete the Modern Pages in SharePoint Online

Image
Hi Friends, In one of the scenarios I have written a PowerShell script to delete large number of pages. Since this activity can be very common, so I thought to share it here as well. Here is the PowerShell script. Happy Coding Sumit Kanchan #SharePointWidgets #Powershell

Random Color Generator using js

Image
Hi friends, Today I felt the need to get the random color in one of my tasks, so i thought to share the code here as well, as sometimes they are great time savers. So in this code below, it will generate the random color everytime the method is called Happy coding Sumit Kanchan #SharePointWidgets

SharePoint Framework (SPFx) Tab Control (react)

Image
Hi Friends, This time I have worked upon a tab control which is still missing from Microsoft sample collection. I personally felt this tab control webpart can be of use in many scenarios. I have used the Rich Text editor for the implementation, where whenever a new tab is added , the text editor automatically gets associated with the tab. Since it is the rich text editor so you can do almost everything you want to display with all the custom formatting options available. Source Code on GitHub Features ! No configuration for the webpart to use Safe and fast as there is no external saving of data Rich Text editor increases lot of possibilities how you use it Light weight control Installation $ npm install $ gulp clean $ gulp bundle --ship $ gulp package-solution --ship Below are some of the images that demonstrates the webpart. View Mode Edit Mode Please provide your comments , if you need any more feature or how you like the control. Hap

Custom Control for Property Pane in SharePoint Framework (SPFx) Solution

Image
Hi Friends, In today's blog I will be explaining how to create a custom control for Property pane in SharePoint Framework, Many times we need a functionality which we cannot be fulfilled using the OOB (out-of-box) controls. For which we have to go with the customized solution. A very basic need that I encountered and will showcase in this blog is the display of colored text with some sort of icon in the Property Pane. For this we can use label but you cannot change the color of the text and there is no property to handle the icon class as well or you cannot add custom css based on the logic. So to demonstrate and understand how the custom control can be created and functions in Property pane of a SharePoint Framework solution. To implement this functionality I will be extending the properties of a Label and adding some more properties to achieve the functionality. Let's start with the structure and it's explanation then we'll move through the code inside

Model Driven App in PowerApps

Image
HI Friends, Today blog is about the basic understanding of the Model Driven PowerApps.  After too much googling for the understanding I have found this 4 video series, after which you will have a better idea about the Model Drive PowerApps. Getting Started with Model Driven Apps Model Driven App Components Part 1 Model Driven App Components Part II Model Driven App Components Part III Happy Coding Sumit Kanchan #SharePointWidgets #PowerApps #ModelDrivenApp

Hiding Left Navigation from the Modern Team Site in SharePoint

Image
Hi Friends, We usually have a very simple requirement that many times we don't require the left navigation. There can be multiple reasons around it. In modern SharePoint Communication site, Microsoft has given is out-of-box, where the navigation is at the top. But what if you want to hide the left navigation from the Modern Team site. So here is the solution Go to Site Settings Click on the " Navigation Elements" under Look and Feel. Un-check the " Enable Quick Launch " option Click OK And now you'll notice that the left navigation option is no more. Pros: Left Navigation is removed Now the content area has full width Webparts will act as the full width webpart , and limitation of "Full width section" is not there as the common section is now acting as full width Content can be more expressive Cons: No more navigation on the whole site. Happy Coding Sumit Kanchan #SharePointWidgets #SharePointOnl

PowerShell Script to update Page Layout in SharePoint online using PnP

Image
Hi Friends, I have came across a very common requirement where I need to update the page layout of the SharePoint online page (classic page), but I think same can be used to update the page layout to the modern SharePoint site. For this I have written a PowerShell script which will update the pages from a specif page layout to the desired page layout. In this script I have also taken care if you are updating the page layout of the subsite, than also this script will handle the scenario. There are 2 parameters which you need to update Old page layout title New page layout title The updation due to this script will not change the modified by as well as modified date, so the original data is not lost. Please provide your comment if you feel that something can be enhanced in the script or if there is any issue