Posts

Showing posts with the label webpart

Adding Script Editor web part to SharePoint classic page using PowerShell

Image
 Hi friends, When we are migrating the SharePoint on-prem to SharePoint online, we need to tell the users about the site is migrated and there are multiple ways of doing it. One of them is to add the redirection script on the page so that the user will get redirected by itself to the newly migrated site. In this blog, I will be showing how to add the script editor web part using the PowerShell and add the script as well. Problem Statement I have a SharePoint list where all the old sites and new sites are mapped. Need to read all the items and add the script editor web part along with the script for the redirection of the page to the new site URL. Script added - It highlights the page and redirects the user to the new site after 10 seconds. Note: If there is a need to change in the script, do change in the  $WebPartXml  variable. Hope this script will save a lot of time and will help you. Happy Coding..!!

Know your SharePoint Framework (SPFx) version

Image
Hi Friends, Most of the time when we are working on the SharePoint Framework or SPFx solutions, the version of each component can create issues while building the solutions. One of the common issues is with the SPFx version. SPFx version is the version of the SharePoint Framework yeomen generator installed on your machine. With the difference in the version, a solution might differ in the import versions of other libraries, change in solution scaffolding, and more... ➡️Steps to know your SPFx version Open the console  Type in the following command  npm ls -g --depth=0 @microsoft/generator-sharepoint Hit enter and wait for a few seconds. You'll get the response   Happy Coding #Microsoft #SharePoint #SharePointWidgets

SharePoint Framework (SPFx) : Cascade dropdown in webpart properties

Image
Hi Friends, In this blog I will be creating a cascade drop down in the webpart properties of a SharePoint Framework - SPFx webpart. In my previous post I have shown how to create a dynamically populated dropdown in the SharePoint Framework SPFx webpart . This blog will be in continuation to that, where I will be extending the previous example to populating the list in the dropdown. In this example I will be showing all the "Views" for the selected list. As we usually comes with the scenario where we need the cascade dropdown. For full code files you can refer here on github. Step 1: Setting up your SharePoint environment If you have not yet setup your SharePoint environment , then refer to my previous blog on Setting up your SharePoint environment . Step 2: Creating a empty SharePoint Framework Project Create a empty SharePoint Framework project. If you are new than refer to my previous article on Set up your new SPFx project .  Step 3: Ins...

Show your SharePoint Framework web part in full Width layout

Image
Hi friends, By default when you create a full width layout we can have only 2 web part by default Image WebPart Hero WebPart So it becomes very difficult if you are creating some webpart which needs to be shown as a full width webpart..  Now the good news is that , it is now possible to show your custom control creating in SharePoint Framework to be shown on the full width. With just minor changes you can achieve this. Open your webpart's manifest file and add the property " supportsFullBleed: true ". This property will allow the webpart to be shown as an option in the full width. Below is the config file where change needs to be made As shown in the image below the webpart is shown as an option. Happy Coding - Sumit Kanchan

SharePoint Framework (SPFx) - Adding dynamic values in (SPFx) webpart properties

Image
Hi Friends, We usually have to add the dynamic values to the web part properties. In this blog I will be showcasing the how you can add the dynamic values to the web part properties. In this blog I will showcasing how you can fill in the drop-down values with the Title of the lists. All the lists will be fetched and then will be added to one of the web part properties. On selection of the drop-down you can see the list selected. Step 1 : Create an empty SharePoint project .  To learn how to create SharePoint Framework Project you can refer to my previous post Setup your new SPFx Project . If you have not setup your environment you can refer my blog  3 Steps to Setup your SharePoint Framework Environment . In my case I have crated Project with the name " spfx-dynamic-values-in-web-part-properties " WebPart with the name " demoDynamicValuesInWebP...