Questions tagged [pnpjs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

Get Site Page URL (Modern Experience) - Pnpjs v1

I have a team site where the pages will be used to create a wiki for a company. In the image you can see the pages of the site created for the moment. I have added an MMS column for Managed Metadata ...
0
votes
1answer
35 views

SPFx - React - OfficeUI Fabric - Assign value from SharePoint List Item to DatePicker and DropDown Controls

Thank you for your reply. I have values stored in SharePoint list. Now I want to provide edit functionality to user so when user selects particular item, I’m showing user the fields in editable mode ...
1
vote
1answer
29 views

Handle failure response on SharePoint list item add using PnP JS

I have created one SPFx web part with React framework to add the items from .CSV file to SharePoint list using PnP JS. I have used PnP JS item.add() method to add the item in the list by looping each ...
0
votes
1answer
25 views

How to implement licensing model in Custom SharePoint Online Solution?

We are creating one small product in SharePoint using Pnp framework and REST API. We would like to implement licensing model in product for selling purpose. Anyone has experience with such kind of ...
0
votes
1answer
43 views

Dynamically Pass List item parameter using pnp js

I have created SPFx web part using React JS framework. I am reading the data from the CSV file and adding item to SharePoint list using inBatch in PnP JS. I was able to add the item to SharePoint ...
0
votes
1answer
51 views

How to retrieve Friendy URL from Term-Driven Page with SP PnP JS

With this piece of code, I get the properties of all terms of termset. I'd like to get the Friendly URL also. terms.get().then((terms:ITerm[])=>{ terms.forEach((term:any)=>{ ...
0
votes
1answer
58 views

SPFx web part does not show/load in SharePoint online “_layouts/15/workbench.aspx” page in the internet explorer browser

I have developed a SPFx web part for SharePoint online, while running the gulp serve command, this is loading in the local workbench (http://localhost:4321/temp/workbench.html), as we can see in the ...
1
vote
1answer
55 views

Method to get term URL in taxonomy in SharePoint TermStore using PnP JS library

Is there a method to get term URL in taxonomy in SharePoint TermStore using PnPJS library? I am using this code to retreive term Name, Parent and ID: export interface IPTerm { parent?: string; id:...
0
votes
1answer
58 views

Using PnP.js Create() and Update() function is not working but Read() and Delete() is working

Using the below SPFx PnP.js code I am doing the CRUD operation in SharePoint online list: private _getListData(): Promise<ISPList[]> { return pnp.sp.web.lists.getByTitle("EmployeeList").items....
1
vote
1answer
25 views

How get team site groupId property from a SPFX webpart with pnp/js

I create a webpart with SPFX and it is deployed in a team site. I need get the team site groupId property.
1
vote
2answers
18 views

How get values that return sp.site.createModernTeamSite in pnpjs

Using below function: const s = await sp.site.createModernTeamSite( CustomerName, CustomerID, true, 1033, "Customer Site for " + CustomerName); You can create a team Site, but ...
2
votes
2answers
55 views

REST API: How to get error details of Field Validation errors, SPListDataValidationException

I am using pnpjs to add items to a list like so: this.spClient.web.lists.getByTitle(this.spList).items.add(requestList); If requestList has items that do not pass column validation of the Sharepoint ...
0
votes
1answer
32 views

Load Terms - typescript error - spfx term store taxonomy

I am trying to retrieve all the terms for a term-set in my term store to be used in an SPFx web part. Following the guide given here. // get terms merged with data from a term set const terms4: (...
3
votes
1answer
61 views

ListItemChangesSinceToken doesn't page correctly?

I'm trying to page through getListItemChangesSinceToken to get an entire list and then any changes to it but I'm getting very inconsistent results. This is what I do to get the initial list of ...
1
vote
1answer
32 views

webparts using @pnp/js

I am trying to create a sharepoint page that contains a webpart which contains some text and images. I am trying to do this using pnp/js. I have been able to create a page using pnp/js, but I can not ...
0
votes
0answers
103 views

How to jump specific page using pnp js for sharepoint pagination

I am using pnp js Get Paged Items for pagination in my SPFx webpart. sp.web.lists.getByTitle("MyCustomList").items.top(10).getPaged(); Suppose I have 150 data in a list. I set 10 data for a page. So ...
0
votes
1answer
54 views

PNP JS Taxonomy Term retrieval not giving me back all terms in SharePoint online

I'm currently developing a WebPart for a client using SPFX, React JS and PNP JS where I need to get a full list of Countries from a Countries taxonomy at Tenant level to allow my to populate a ...
0
votes
0answers
83 views

REST API: How to get field names in different language

I am using the REST API via pnpjs and nodejs to access Sharepoint online. I'd like to get field descriptions and titles in a language which is different from the user's current settings. How could I ...
0
votes
1answer
16 views

Uncaught TypeError: Cannot read property 'txt' of undefined

I am new to PnP JS and I want to try it. Part my code: import pnp from "sp-pnp-js"; ... pnp.sp.web.select('Title').get() .then((data) => console.log(data)) But I got an error in console: ...
0
votes
1answer
54 views

pnp.js folder.moveTo() error: Microsoft.SharePoint.Client.ResourceNotFoundException

According to the pnp.js docs at: https://github.com/pnp/pnpjs/blob/dev/packages/sp/src/folders.ts there is a method called moveTo() which presumably moves a folder to a destination. However, the ...
3
votes
1answer
74 views

Sharepoint Item rest query How to get the multiline column value which has append text property set true

I have a multiline column named as "Notes" in a list. This column has the "append text" property set to true. So when I retrieve the item I am getting this column null value. Please help me query this....
1
vote
1answer
130 views

Query site collection property bag in SPFx extension

I am building an SPFx Application Customizer for a Powell365 project, and trying to have it use custom properties from the current site collections's property bag. I already managed to get these ...
0
votes
0answers
30 views

PnP JS Core : Uncaught (in promise): TypeError: Cannot read property of undefined

I am using PnP js in one of my angular 6 project. I have a function which is defined in the Component, but I am getting this error at run-time when calling from inside the success of PnP SP js: ...
2
votes
1answer
319 views

How to Get Site-users and Site-groups in SPFx using PnP-JS?

How to get the site users and site groups in SPFx using PnP JS? Thanks in advance.
0
votes
1answer
34 views

SharePoint Online Mega Menu

How can I create a Mega Menu using term-sets in SharePoint online? Any help would be appreciated. Thanks in advance.
0
votes
1answer
28 views

Get List Column configuration using pnp.js

I want to fetch the List column configuation to check if a field is required or not. But I am not able to figure out which function to use by looking at the documentation.
0
votes
0answers
36 views

Using PNP JS with SPFX 1.1

I am using SPFX 1.1 (because our SharePoint Environment is 2016) and tried to integrate PnP (Version 1.3.3). I followed the instructions from here to switch to typescript 2.4.2 instead of 2.2.2 https:...
1
vote
2answers
262 views

SharePoint Multiselect Choice field Saving using PnPjs

I want to save multi-select drop-down in SharePoint field. I already referred few results in this site. Choice values in SharePoint : Test1, Test2, Test3, Test4, Test5. From the custom drop-down ...
0
votes
1answer
58 views

SPFX: is @pnp/sp get call asynchronous?

I am new with @pnp/sp and I am having problems with my code: public render(): React.ReactElement<IVisualizadorPermisosProps> { var arbol=[]; sp.web.get().then((data)=>{ arbol....
0
votes
1answer
104 views

PnP js call returns “Item does not exist”

I'm running a small code to upload file in a SharePoint 2016 document library and to change a metadata. Sometimes (but really often) my code returns error "Error making HttpClient request in ...
0
votes
5answers
466 views

Adding SP user to member group - Team Site

I'm using the "Create a modern team site" using the PnP/PnPjs, and I want to add a user to the "Members" group of the newly created site. I tried using this code: let memberGroup = ...
1
vote
1answer
204 views

Programmatically creating folders in lists results in invisible or incorrectly named folders

So far I've found two ways to create a folder via pnpjs-wrapped API calls. One, which is SPList.rootFolder.folders.add("Name") works well for a document library, but, when used in a list, it results ...
0
votes
1answer
135 views

The query to field 'list/ChoiceField' is not valid."

I have a lookup list that contains a choice field. I'm trying to retrieve it's values using rest Expand= "list" Select= "list/ChoiceField" I get The query to field 'list/ChoiceField' is not ...
0
votes
1answer
62 views

Q: Set Folder's path according to it's title in a list with SPFx

I am creating a folder inside a List with the following code: TypeScript import {sp} from "@pnp/sp"; const shpList = sp.site.rootWeb.lists.getById(ListId); shpList.items.add( { Title: folderName, ...
1
vote
2answers
345 views

Q: Create list item inside folder with SPFx

I am trying to create an item within a folder in a list. Is there an approach with pnpjs that looks like the following? TypeScript import {sp} from "@pnp/sp"; const shpList = sp.site.rootWeb.lists....
0
votes
0answers
14 views

pnp-sp sp.site.createCommunicationSite do not apply the custom site design

I noticed, that the sp.site.createCommunicationSite function e.g. var data = await sp.site.createCommunicationSite(title, 1033, false, url, descr, classification, customSiteDesign); does not apply ...
0
votes
2answers
74 views

Q: Create visible folder in list with SPFx

Having the following code in an application extension: TypeScript import {sp} from "@pnp/sp"; /*******************************************************************/ const shpList = sp.site.rootWeb....
0
votes
2answers
1k views

Cant get List items when list item count gets over 5000

As the title says, I am using pnp js in a SharePoint online list: here is my code: let list = sp.web.lists.getByTitle("Resource Projection"); let query = `Quarter_x0020_Num eq ${currentQ} and ...
0
votes
1answer
336 views

Get another user info using PnPJS with SPFx

I want to get a list of items from a SharePoint list, and display them in a specific way in SPFx webpart. I could use PnPJS to get Text and Number fields, but for the Author field, I am only getting ...
0
votes
0answers
338 views

Q: Get item URL from a lookup field using pnp/sp javascript library

Set up: Something that may be relevant is that the Sharepoint is in spanish. The script accesses a list to know if the current user has read the mandatory information. This list has a reader field and ...
0
votes
1answer
109 views

PNP.js is not working in Internet Explorer. Am not using SPFx. Custom SharePoint page

I am doing CRUD operation using pnp.js in SharePoint site through custom page. I am able to perform all the actions in EDGE and Chrome browser. But when I try to do the same in IE browser its not ...
0
votes
0answers
96 views

Get multiple attachments from SharePoint list using pnp.js

I want to get all the added attachments from the SharePoint list using pnp.js and show those attachments in to a custom page div. I have to use pnp.js to get the attachments. Could you please help ...
0
votes
1answer
211 views

PNP.js adding a new SharePoint Group and setting the Group owner

I'm writing a webpart that creates several SharePoint Groups. I'm trying to set the Group Owner so it's not defaulting to the user creating the group. According to documentation, this should be ...
0
votes
1answer
335 views

How to get count of files Inside a subfolder- pnp-js?

I can get the count of files in a root folder using this pnp.sp.web.lists.getByTitle("Test").items.getAll().then((allItems) => { // how many did we get console.log(allItems.length); }); ...
0
votes
1answer
217 views

PNP-JS-How to check whether a folder is empty

I have gone through the questions in this forum and most of them address the Issue of how to check whether a folder exists in a Document Library. But, I would like to know how to check whether a ...
3
votes
3answers
932 views

SPFX and pnp/sp : How to get all sites

I am here today to ask you : how do you retrieve all sites on your tenant by using Pnp (formerly known as pnp-js) ? Or even using CSOM. I am trying to create a webpart where, in the PropertyPane, the ...
1
vote
1answer
144 views

How to test PNP using JEST?

Is there any way to mock the context of the webpart since i need it to be able to make a request through pnp ?
1
vote
1answer
280 views

Adding sections and web parts to the modern pages is not working

@pnp/sp version is 1.2.3/1.2.7 SharePoint version is SPO (online) I am loading the site in the Web object and adding the client side page using the web object. Once the page got created I am adding ...
2
votes
1answer
284 views

Get User's Time Zone using PnPJs

We are trying to retreive current user's profile Time Zone SPS-TimeZone from a SharePoint Framework webpart, but we are faicing an error (see below). Does anyone know about the best/most effecient way ...
2
votes
0answers
80 views

SPFX WebPart: Getting HTTPS certificate ERROR in IE11

Getting HTTPS certificate error in IE11, webpart is working fine in chrome, firefox, and Edge but NOT in IE11. The webpart is just displaying some simple list data in dropdown component, and nothing ...