Posts

Showing posts with the label Sharepoint o365

Play Big with large lists and document libraries

Image
  What if the SharePoint list or library grew too big? This is a very common question when you are designing the SharePoint solution. So in this article, I will try to explain how you can do that. Impact of unhandled Large List So, the problem first, What is the impact if it grew too large..?? Will we lose data ... ?? NO Will, the data be deleted... ?? NO Is data not safe.. ?? NO What is the Threshold limit? So what is the impact of a large list?? yes, Threshold is the cause The impact is that you will get the threshold error if your view contains records greater than 5000. When any list or library view returns records of more than 5000 it displays the threshold error. This is the hard-line limit a view can show up the number of records. So, there are multiple ways you can handle this error Solution 1: Switch to Modern View, as the latest the best and will be continuously improved. For modern Microsoft is continuously evolving and more enhancement will be there in the future. Solut...

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

4 Useful VS Code extensions for SharePoint Framework components

Image
Hi Friends, Today I will talk about the most useful VS Code extensions, that will help in the productivity of specifically SharePoint Framework projects. As a developer, we waste a lot of time in the tasks that could be done easily via extensions support or shortcut keys. In this blog post, I will discuss some of these extensions that will increase the productivity and the style of your code. With an increase in productivity, the styling also holds an important value as it makes the code more readable and understandable which increases the focus time. So let's dive then !! VS Code Extensions !! Debugger for Chrome:  A very important extension if you are a SharePoint online developer (developing SharePoint framework components) then it is a must to have this extension. This extension helps in debugging the SharePoint Framework components just as we used to do in the C# server-side coding. For details on how to configure, you ca...

SharePoint Online list conditional formatting and list forms formatting

Image
Hi Friends, As of today's update Microsoft is coming up with some new features as part of the SharePoint list and list forms formatting are concerned. Below are the highlights of the video: New Term has been introduced: RULES Using these rules one can do the column formatting without writing the JSON Customization of list forms (apart from PowerApps) Show/Hide of columns conditionally Re-arrange the rendering of the fields (sorting) Happy Coding Sumit Kanchan #Microsoft #SharePointWidgets

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

Time based query issue in SharePoint Framework

Image
Issue: Whenever you are making query to the SharePoint online using the REST API and your query is based on the time stamp, remember that SharePoint treat your time as the GMT timezone. So if you want to fetch information based on local time zone which we usually do, always set the offset and also include the daylight saving. The same is true even you are trying to put in some data to the SharePoint. You will be saving the local timezone but SharePoint will consider it as GMT time zone , and there you won’t be able to save/retrieve the correct records based on the time zone. Solution Solution is simple. SharePoint Framework webpart/extension offers this capability OOB, but there were no articles i was able to find. // will get the final offset in minutes    let finalOffset : number = this . context . pageContext . web . timeZoneInfo . offset + this . context . pageContext . web . timeZoneInfo . daylightOffset    // Now set th...

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...

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...