Posts

Showing posts with the label PnPJS

SPFx with PnPJS CRUD Operations (V3)

Image
Create new SPFx React webpart         Follow this post to create new SPFx solution & open it in VS Code.           Note: All file creation & Basic details of each files are available in this post. Final Output:      Here we will be getting all the SP list names into dropdown list & doing CRUD operations in the selected list. Install PnPJS:       Run this below command to install PnPJS. (Note: Here we use PnPJS Version 3, sp & graph objects have been deprecated. We will be using spfi         npm install @pnp/logging @pnp/common @pnp/odata @pnp/sp --save Create "pnpjsConfig.ts":                In PnPJS Version 3 sp  and  graph  objects have been deprecated and will need to be replaced ( link ). So we are using this new config file. (RightClick on webpart folder>newFile>pnpjsConfig.ts) webpart.ts: Initial...

PnPJS Introduction

 PnPJS ( Patterns and Practices Client-side Libraries): PnPjs is a collection of fluent libraries for consuming SharePoint, Graph, and Office 365 REST APIs in a type-safe way. You can use it with SharePoint Framework, Nodejs, or JavaScript projects. Install PnPJS in SPFx use the below commant.(Latest version 2.14.0 as of Nov 2022) npm install @pnp/logging @pnp/common @pnp/odata @pnp/sp --save PnP Packages:     Below are the some basic packages we can use. @pnp/common    – Provides shared functionality across all pnp libraries @pnp/config-store    – Provides a way to manage configuration within your application @pnp/graph   – Provides a fluent API for working with Microsoft Graph @pnp/logging    – Light-weight, subscribable logging framework @pnp/nodejs    – Provides functionality enabling the @pnp libraries within nodejs @pnp/odata  – Provides shared odata functionality and base classes @pnp/pnpjs  – Rollup library of...

SPFx All Posts

SPFx introduction . SPFx Developer Tools Setup Evaluation of SharePoint Coding App Catalog & Work Bench Debug SPFx React webpart with Visual Studio Code SPFx with No Framework (Plain TypeScript): Create SPFx Webpart using Visual Studio code & Type script   Create SP Library as CDN (Upload SPFx webpart assets into SharePoint library) Customize SPFx webpart Properties Adding jQuery to SPFx webpart & Adding Accordion control using jQuery SPFX with React: SPFx React Basics & Life-Cycle CRUD Operations using SPFx React Webpart & Rest API (SPHttpClient) SPFX with PnPJS: PnPJS Introduction SPFx with PnPJS CRUD Operations (V3) SPFX with MS Teams: Build MS Teams Tab Using SharePoint Framework SPFX Other Important Topics: SPFx Run with elevated privileges Token type is not allowed Error While using Client Id Client Secret For more details refer this YouTube link