Category Archives: PnpJS

I usually use PnP JS to make my calls in a SPFx Webpart, this is a great framework, you can expand lookup fields simple and clean. The problem is you cannot use Project Fields in order to query 2 levels, let’s start with an example: In this case you are expanding Title from Workshop and Id from Participant, what about if Workshop have a relation with a City List? in this case you have to use projected fields to query a List from another List Projected Fields From Microsoft, an example I’m exploring a framework CamlJS from Andrei Markeev in order to smooth the user experience in TypeScript in a ReactJs WebPart. This framework was originally developed for JavaScript, so I ended up with some problems. First the result of the Caml Query add a perfix to the Object as you can see here $N_1 is the View and $o_1…

Read more

Summary If you have purely Yes/No tasks in order a Workflow to run then continue what it’s suppose to do, this is maybe something You’ll search. Don’t forget PnP JS save you large amount of lines of code, and is my recommend approach for Batching Calls. It Must run in the context of the Webpart, so you have to give him context. This code belongs to a Webpart with a ListView Control from the React PnP Controls and PnP Reusable property pane controls for the SharePoint. I didn’t create any Data Model Interface, that’s why I’m using Object.Keys and JSON.stringify from the REACT State. Loading property is for the UI Fabric Spinner. Installation I’m using SPFx version 1.8.2 PnP JS https://pnp.github.io/pnpjs/ PnP React Controls https://sharepoint.github.io/sp-dev-fx-controls-react/ PnP Property Controls https://sharepoint.github.io/sp-dev-fx-property-controls/ The Web Part Properties and State Putting all together with PnP Property Controls REACT Component The Properties SCSS File TSX File…

Read more

2/2
RSS