Showing posts from September, 2020

Logging in SharePoint Framework Solutions

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

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