Posts

Showing posts from 2020

Logging in SharePoint Framework Solutions

Image
Hi Friends, today I will be discussing about how logging should be done in SharePoint Framework of SPFx solutions. Logging plays a very important role when we need to debug the code in the production for any error and improper or no logging makes it really hard to find the root cause of the issue. While logging we need to take care of the following pointers What information needs to be logged Where to log How long it should be maintained etc... To take on this burden, Microsoft has given a dedicated class for the logging which can be utilized well to make the purpose. @microsoft/sp-core-library This library holds the solution. In sp-core-library Microsoft has exported a class name " LOG " which contains the static methods to write the logs Below the how you can import the class into your solution import { Log } from ' @microsoft/sp-core-library ' ; In this class, you'll get 4 static methods Error Verbose Info Warn Let's have a look on how to use each of the me

SPFx Chat Bot - using SharePoint Framework Extension

Image
 Hi Friends, Today I have created an SPFx chatbot using the SharePoint Framework extension. This is a small simple to configure bot. It consumes the QnAMaker API to retrieve the answers for the asked questions. The code c an be found here Features !! Easy to configure with little configurations Compatible with the prompts Displays the formatted text as done in the knowledgebase Can filter on single metadata value as well as multi values Option to select the operator for the filter values Its an SPFx extension, so can be deployed at a site collection level or the tenant level   Configuration Needed. Login to the QnAMaker.ai Create the knowledgebase (follow steps here  ) Got to the settings  follow the markers below to retrieve the configuration To get the source code click here Working Demo Steps for deployment There are 2 ways how you can deploy Deploying package directly To deploy the package directly follow the below steps Go to the release page on Github by clicking here Download th

Speed up your development by speeding gulp serve

Image
 Hi friends, I have been not a very big fond of PnP solutions, but sometimes they do really great. Today they have come up with a real booster to the SPFx development. Most of us when working on a big SPFx solution with 5 or more webparts in a solution then we must have felt that the gulp serve process is too slow to build the solution and keeps on decreasing as the solution size increases. Now there is a solution to the problem. Steps... Install the npm package globally run the command install the package execute the command And that's it. Once the npm run serve  is executed, it will call the gulp serve and then see the magic, by changing any of the file and save the file, With my personal experience, it was taking more than 2 mins now it's just the matter of milliseconds Support: It supports the SharePoint Framework 1.4.1 and above (not SP2016), so no worries and build fast. For more documentation on how it does the magic, click here Here is the youtube video which explains t

Learning fast development : ECMA script useful methods

Image
 Hi Friends, In this blog post, I will be updating the most useful ECMA methods that are often used and are very useful in getting the expected results and also speeds up the development time. Go through them and try them, and I am quite confident you'll see the difference. Template Literals xxxxxxxxxx   const Currency1 = "Dollars" ; const Currency2 = "Rupees" ; const exchange_rate = 72 ;

Export SharePoint List to Microsoft Word using SharePoint Framework Extension (List view command set)

Image
 Hi Friends, With the introduction of SharePoint list view formatting, I have realized that the scope of playing with the lists has also increased. I was working on one of the list view formatting and thought how if someone wants to export the list items to a Microsoft word? For example, if one creates the FAQ in a SharePoint list, it can be made visibly beautiful using the list view formatted, but if they need to export the same in a word document then? So I came up with the idea of exporting the SharePoint List items in the Microsoft Word format and created an extension which with one click exports the list items in the Microsoft Word. for source code click here. Features..!! Exports all the list items from the SharePoint list to the Microsoft Word with beautiful formatting. Want to export only a few items? Just select the items and click on the export and it will export only the ones you want. Export the items with fields based on the current view fields If the view contains exactly

SharePoint List View Row Formatting: Ideation Management

Image
Hi Friends, In this blog, I have created a formatted for the ideation management. In most of the organizations we do have it, some are having it as an isolated product and some of them have it in a SharePoint List.  So I have come up with a design, which will help in managing the ideation more efficiently. Look into the features and it might attract you 😊 You can find the code here Features..!! Clear identification of the stage of the idea Filter on the base of the stage of the idea Clear display of the estimated budget and benefits from the idea Clear display of the Risk of the idea Assign medal to the idea which is most valuable Columns needed for the view Title Description Submitter Budget Cost Benefit Estimate Risk Rating Stage Assign Medal Hope this view will help you. Happy Coding..!! #Microsoft #SharePointWidgets #ListViewFormatting

SharePoint List View Row Formatting: Deployment Schedule

Image
Hi Friends, Many of us have maintains the deployment schedule in SharePoint List and with a lot of columns and information, it is really painful to have a view with all relevant information. Today I had worked on the SharePoint Deployment Schedule list to give it an interactive view so that one can know about the status one first sight. Code can be found here With the help of JSON, the view displays the current status of the deployment for different environments, the responsible person, and the spring in which it was to be deployed. There are two views, List View Tile View To get the view following columns will be needed Title Application Package Version Status QA Deployment UAT Deployment PROD Deployment Responsible QA Deployment Sprint UAT Deployment Sprint PROD Deployment Sprint Hope this post will help you. Happy Coding..!! #Microsoft #SharePointWidgets #ListViewFormatting