Questions tagged [pnpjs]

The tag has no usage guidance.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
130 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 ...
3
votes
1answer
651 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....
2
votes
1answer
30 views

Get page load time in modern SharePoint site

I need to run some JS script on each page in modern SharePoint online communication site so I created SPFx extension and added to the site. One of the things I need to do is to get page loading time (...
2
votes
2answers
416 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 ...
2
votes
0answers
147 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 ...
2
votes
0answers
240 views

PnP JS cross domain calls?

Does PnPJS have a way to make a cross domain call to a site collection? Trying to get data from another SharePoint site that I believe is on another web app and a different domain. This is SP2013
1
vote
0answers
18 views

PnP JS Search API - Get/filter all user created docs in a site collection

I would like to get all user created documents in the whole site collection using PnpJS Search. const results = await sp.search({ Querytext: ` contentclass: "STS_ListItem_DocumentLibrary&...
1
vote
0answers
20 views

Initialising spfxContext for a different user in pnp/sp

I'm trying to build an spFx app, that uses a different user to access lists and libraries than the logged in user. The logged in user won't have the permissions to access the lists directly but only ...
1
vote
1answer
80 views

How to set thumbnail image and page description for sharepoint modern pages using pnpjs?

I'm trying to set thumbnail image and page description programmatically using pnpjs. By default it is picking banner image as thumbnail image and first paragraph in page as page description. How can i ...
1
vote
1answer
163 views

Fetch multiple images from SharePoint library and display images in SPFX webpart

SharePoint Library -- Multiple image and HexID field I am able to display one image by giving full URL of images but i have to filter the images based on HexID, But I am not sure how to apply filter, ...
1
vote
1answer
459 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 ...
1
vote
1answer
91 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 ...
1
vote
0answers
440 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 ...
1
vote
1answer
384 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 ...
0
votes
0answers
10 views

Get UPN or Azure AD User Id from SharePoint People or Group LookUp field

I'm using PnP JS to get the the values of a Person or Group field. Is there a way to retrieve the UPN or Azure AD User Id, using the SP Rest API? I have looked everywhere and I can't find an answer to ...
0
votes
0answers
15 views

Iterate nested array of objects and append children to a particular object using jQuery/React

Iterate nested array of JSON objects and append children to a particular object using jQuery/React We are trying to create a tree view navigation using PnP react TreeView control for SharePoint ...
0
votes
0answers
21 views

Copy documents from document library A to document library B

I have a requirement to develop a solution based on SPFx, namely, copy main versions of a documents from document library A to document library B. I have tested copyto (PnP.js) but it only copies the ...
0
votes
0answers
19 views

Microsoft Teams Tab is not able to fetch SharePoint List Data

Is there any way, so that my "Teams Tab" could fetch the value from SharePoint list's data? I have used SP PnP JS library in SharePoint SPFx to build this solution. I have Sync this ...
0
votes
0answers
28 views

Teams showing - Can't load the application on this page

I created a new application using SPFx in SharePoint online. I have sync the sppkg solution file to the Microsoft Teams. But when I am adding the application in the teams Tab its showing an error: ...
0
votes
0answers
10 views

Check if Group has a Role

I have a custom Role "My role" and a list. Is it possible, using PnPjs, check if a group of current user has the custom role "My role"? Thank you
0
votes
1answer
128 views

Read excel file in spfx pnp js

I want to read an excel file which is stored in SharePoint library in PNP JS. How can I achieve this ?
0
votes
0answers
76 views

Typeerror : failed to fetch in pnpjs in Sharepoint SPFx webpart

I have written below code in SPFx Webpart to upload file to Sharepoint Library. It gives me error sometimes like TypeError : Failed to fetch. Can anyone give me some idea what this error signifies and ...
0
votes
1answer
57 views

Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'

I can not access getFolderByServerRelativeUrl() in pnp API. await sp.web.getFolderByServerRelativeUrl() Error: Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'.
0
votes
0answers
17 views

Creating OOTB groups using SP pnp JS failed

I am using below script to create OOTB groups(member,visitor,owner) through SP PnP js in SharePoint Online. (async () => { const owner1 = "i:0#.f|membership|Username@<tenant>....
0
votes
1answer
29 views

Create and Update Dictionary Key Value Pair using PNP js

I have a doubt in Key-value pair object. I need to create a key value pair and then I need to update it. Example: I have to create the following kind of object: var itemval = { Id:1{Name:aa,Idval:1}...
0
votes
1answer
34 views

Cannot get related items with PnPjs search on workflow task content type

I am working on SPFx Project and using PnPjs search. My requirement is to search for pending workflow task for that I have created result source at site collection level. Builder query as below {...
0
votes
0answers
41 views

Sharepoint Spfx List View command set

I have a requirement to create a List view command set in SharePoint Online(no framework used) for a document set library. My document set has many folders based on year. So , basically I need to ...
0
votes
1answer
65 views

How do I fetch items from a specific view(s) of a Sharepoint list in SPFX?

I'm trying to fetch items from a specific view of a Sharepoint list in SPFX using @pnp/sp library but I'm unable to do so. I'm able to fetch the view properties and fields of the list. I didn't find ...
0
votes
0answers
23 views

Issue while searching folder with specific name

I am facing an issue while retrieving the folder available in a list based on userId. Using the below code to fetch the folder using Name and the “response” returned is most the times “not available” ...
0
votes
1answer
189 views

Move specific folder using PnPjs in a document library

I have add below PnP JS code but it's not working correctly and throwing error "Property 'moveByPath' does not exist on type 'Folder'". await web.getFolderByServerRelativePath(oldPath).moveByPath(`${...
0
votes
0answers
42 views

SPFX open newform in modal

I'm new in SPFX and i'm trying to open a new form from a button. I'm testing IFrameDialog but it doesn't display it(https://sharepoint.github.io/sp-dev-fx-controls-react/controls/IFrameDialog/) I've ...
0
votes
0answers
79 views

How to filter moderation status with pnp js?

I have a news portal, and I only want to show the approved news. It is possible, with pnp js in SharePoint 2019? I try filter with ModerationStatus, OData__ModerationStatus and _ModerationStatus name, ...
0
votes
0answers
19 views

Set properties of a spfx people web part dynamically using pnpjs

I've created a new modern SharePoint page using spfx pnpjs. Now I need to add a people web part to it with adding people to it dynamically through code. How can I achieve this? Thanks.
0
votes
0answers
139 views

How OverrideViewXml parameter works with ViewXml in RenderListDataAsStream in rest API?

I am working on to get data from SharePoint list using the RenderListDataAsStream endpoint. What I am doing is first getting all the views defined for the list and showing them in a dropdown on UI and ...
0
votes
0answers
379 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
295 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 ...
0
votes
1answer
44 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
307 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
216 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: ...
0
votes
1answer
95 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
0answers
79 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:...
0
votes
2answers
3k 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
365 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
632 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
418 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 ...
0
votes
0answers
64 views

REST call for fields: “Type cannot be null”

I'm making rest calls to get a lists fields in a custom JS application. For some reason it's failing when I make the call through the app but when I do it in the console it works fine. I'm using ...