Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pnp-js-core]

The tag has no usage guidance.

1
vote
0answers
12 views

Make multiple File Upload with their respective fields using PNP JS

I have a picture library with 4-5 fields - Lets Take - Title(string), Date(Date), FlagOn(Boolean). I am trying to upload 10 files to my picture library and for all these 10 files i want the same ...
0
votes
1answer
1k views
4
votes
2answers
961 views

Asynchrounously load lookup column values in an SPFX/PNP-JS-CORE editform

I'm working on a spfx app to be used as a SharePoint list form. The app will be used to edit ha a LOT of lookup columns. the lookup columns are rendered as dropdowns in the react component. I am ...
0
votes
2answers
42 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
0answers
7 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
90 views

SharePoint framework unit testing pnp

How can I test with jest a pnp function? How can I mock the webpart context and pnp responses? I'm using spfx webpart, pnp-js-core and jest for unit testing Thanks.
0
votes
1answer
32 views

SharePoint Online Search - Managed Property

How can I create a new managed property with an integer data type in the search schema in SharePOint Online? Thanks.
0
votes
1answer
58 views

How to return string from sp pnp js request?

I need help with how I can return a string from a SP PnP js request? I want to display the string displayName in the console log on the last line. The result.Title is a string. public static ...
0
votes
1answer
29 views

SharePoint Online Search

How could I filter by range in a managed property of type number in a sharepoint search? I'm using pnp-js-core Thanks so much.
1
vote
3answers
272 views

Retrieving column fields from SharePoing list using sp-pnp-js

I have a list. I want to retrieve the fields to see how many column are there in my list. For example, my list name is TestList, I have created 5 columns of different datatypes. I want to retrieve ...
4
votes
2answers
2k views

Insert multiple users and groups in a user field of a Sharepoint Online list using Pnp-Js-Core

How can I insert multiple users and groups in a user field of a Sharepoint Online list using Pnp-Js-Core? greetings and thanks.
1
vote
1answer
110 views

How to upload file in document library using pnp/sp

I have written code to upload the file in SharePoint online .. but while upload the page gets refreshed .. Please help . Code - sp.web .getFolderByServerRelativeUrl("Student%20Details%20No%...
1
vote
1answer
155 views

How to expand person lookup field?

How do I select all the fields and expand a person lookup field using the pnp js library? $pnp.sp.crossDomainWeb(addinweb, hostweb).lists.getByTitle("Sites").items.select('*').expand('Person Field')....
0
votes
1answer
164 views

Error while creating list item with multi-user field - pnp js / spfx

In my spfx webpart, I'm creating list item using pnp js. As per pnp-core-js documentation I have written following code, but its failing with error. Private AddListItem() { pnp.sp.web.lists....
0
votes
0answers
34 views

List get does not return items

Beginner with sp js api here. $pnp.sp.crossDomainWeb(addinweb, hostweb).lists.getByTitle("Sites").items.get().then(function(result) { console.log(result); }); I can see it does ...
1
vote
1answer
29 views

Getting always extra button on display .. 1 button dont have any ID

I am having problem while looping. I am always getting an extra button. Please help. {this.state.items.map(myitems1 => { return ( <div key={myitems1.Id}> <span>{...
0
votes
1answer
33 views

Sharepoint PnP & SPFX React [duplicate]

While binding the data always getting extra row ... {this.state.items.map(myitems1 => { return ( <div key={myitems1.Id}> <span>{myitems1....
4
votes
1answer
59 views

Unable to pull in Number/Lookup Columns using pnp.js

I'm pulling in data from a SharePoint list and I'm having some issues pulling in certain columns. I was able to successfully pull in the 'Title' column which is a single line of text, but 'Rank' and '...
2
votes
0answers
82 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
2
votes
1answer
128 views

Rest API to update a library item giving 400 error

The code am using: pnp.sp.web.getFolderByServerRelativeUrl("Shared%20Documents").files.getByName("test.jpg").getItem().then(item => { item.update({ Title: "A Title", ...
2
votes
0answers
44 views

I need to get all properties of taxonomy termstrore. which I already get are “Label”,“WSSId”,“TermGuid” but I need to get Other labels as well

Is there any solution to get other properties for taxonomy termstore. As I remember, I usually used "include" to get all properties which I mentioned in JSOM. But now I need to work by using ...
0
votes
0answers
122 views

Error while using `inBatch` in SP PnP JS

We are using SP PnP JS inBatch method to batch requests but are getting error. Below is the sample code snippet. sp.web.lists.getByTitle('ListName') .items .filter("Filter condition") .inBatch(...
1
vote
3answers
450 views

Promise Is Undefined for PnP Js core SharePoint - IE & Edge Browser

I am a beginner using PnP js core Library. I am using PnP Js core library in my SharePoint web part to Display list Items from SharePoint list. The code works fine in Chrome and Firefox browsers. ...
0
votes
1answer
352 views

Show loading indicator for any ajax operation via SP PnP JS

We are developing a SPFx webpart and are using SP Pnp JS to fetch and update list items. Previously we used AngularJS where we write a directive to capture any $http events and show a loading ...
0
votes
1answer
80 views

SharePoint Content Editor not displaying PnPJS Code

I want to be able to display my PnPJS code and make it show up within the Content Editor, but I am having trouble pulling the data in and displaying it. Here is what I have so far: 1.) I made a ...
4
votes
3answers
608 views

PnPJS with on-prem sharepoint?

Is it possible to use https://github.com/pnp/pnpjs with on-premise SharePoint with an external NodeJS application? Installing web parts is not an option I must perform read-only access. If so, what ...
4
votes
1answer
385 views

Can't get context for pnp get api calls in spfx solution

I'm having trouble getting the correct site context for @pnp/sp. It works fine in workbench but not when I deploy to a site and add to a modern page. My api calls are being made to /_api/sitepages and ...
3
votes
2answers
164 views

Batch operations in SharePoint 2013

Unfortunately, I am stuck in a SP 2013 world now. I know batch operations (using REST APIs) are only supported in SharePoint 2016+ and in SPO. Pnp Js also has a good batch processing extension methods....
1
vote
2answers
435 views

Deleting sharepoint list items with pnp results in bad request

Running pnp in modern script editor spfx web part, can add items, get items from a list, but cannot delete items from a list: $pnp.sp.web.lists.getByTitle('List Name').items .filter('Title eq ...
1
vote
1answer
1k views

How to update a metadata list field using PnP

I'm trying to update a list item field that is Managed metadata field using PnP-JS-Core. First I was getting this error: pnp.min.js:10 Uncaught (in promise) TypeError: Converting circular structure ...
0
votes
1answer
93 views

sharepoint pnp calls returns undefined even before calls to SP finishes

I am working in an spfx project and i need the user ids of the users from the SharePoint persona people picker of fabric ui. here is what i have so far. component that calls the function: let ...
0
votes
1answer
237 views

pnp/sp how to return user information after creating a list item?

I am creating an SPFX webpart and i have to call pnp/sp to check if a list item exist and if it isn't i will create a new list item. this is my code for creating a new list item: return sp.web.lists....
0
votes
1answer
213 views

PNP js API document update issue

I tried creating inserting a document in a document library using pnp js library. Problem comes in a specific case: A document is inserted in a library. Now this document is deleted and sent to ...
0
votes
0answers
139 views

Search query not working when using a date variable (does when hard-coded) in Internet Explorer

Issue In my SPFx app I am using search to pull back events. Everything is working great, except in IE and Edge. I have determined what it doesn't like, but not why it doesn't like it. Rendered ...
0
votes
1answer
179 views

With PNP JS, How do I handle odata.null return values?

I'm using @pnp in my SPFX project, and I need to get tenant property. The code is as followed: sp.web.getStorageEntity('mytenantproperty1') .then((prop: StorageEntity) => { //How do I ...
3
votes
2answers
442 views

Frequent sites on SharePoint Online Home Page

Is there a way I can have "Frequent sites" on my website? Is this a webpart or SpFx component that I can add to any of my existing site? I would like below into my own site page. Digging bit more I ...
2
votes
0answers
102 views

Dynamic update Icon in SPFX client Web Part

I am using office ui frabric details list to display documents on spfx client web part from here. Now, I want to implement check-in/check-out icons to be displayed on spfx client web part dynamically ...
1
vote
1answer
440 views

Trying to update Managed metadata column value in sharepoint library using pnp js

pnp.sp.web.lists.getByTitle("ListName").items.getById(1).update({ Title: Title, DeptDiv://internal name of list column { __metadata: { "type": "SP.Taxonomy....
1
vote
1answer
114 views

SPFx On-prem - How to lock thread when add new item with PnP-JS

I have list column where save unique department number and I want to lock thread when add new list item, because when two users click in the same time button save - department number is duplicated. ...
0
votes
1answer
598 views

Working example with sp.profiles.clientPeoplePickerSearchUser from PnP @pnp/sp

I'm trying to take advantage of the people picker search helper in the PnP-JS-Core, but I get a JSON error in SP2013, 2016 and SharePoint Online. The error is the same everywhere. If I try to get data ...
3
votes
1answer
1k views

PnP-JS-Core Property bags

Is there a way to get the property bags using PnP-JS-Core? There is nothing about it in the documentation or blogs that I've found in google. Using REST the call is: http://sitecollection/site/_api/...
0
votes
0answers
199 views

SPFx:: pnp js :: Delete selected file from client web part using Reactjs

I have a SPFx client web part with documents from library. Now when I select item/row, I need to perform different operations like Delete/Check-in/Check-out based on the button events. I need to ...
1
vote
1answer
182 views

Get documents thumbnail using pnp-js-core or rest api

How can I get documents thumbnail using pnp-js-core or rest api. I need to render a document card with its thumbnail. Thanks.
0
votes
1answer
252 views

download file from document library by the help of item ID

How is it possible to download file from document library by the help of item ID? In my data I have only item ID of a file which was uploaded to document library now I want to download the file i.e ...
0
votes
1answer
674 views

Sharepoint Framework/PnP-JS/React : How to set a Class Property Value from a callback function

import { Web } from "sp-pnp-js"; import pnp from "sp-pnp-js"; interface ISPVehicule { Title: string; Marque: string; Modele: string; Vitesse: string; Poid: string; } export default ...
0
votes
1answer
261 views

Sharepoint Framework/PnP-JS/React : state Object doesnt work

I have created a property (age) in the state Object. However, I can not access this property in my code. I am getting an Error Message: Property 'age' does not exist on type '{} Here below is my ...
1
vote
1answer
840 views

Is it possible to Update SharePoint user field in Rest API with Email?

Is it possible to Save/Update User Field in SharePoint Rest API using email Addresses instead of USERID. Because in order to save 20 users i need to make 20 rest calls to get Userid is there any ...
-3
votes
1answer
681 views

How to access to SharePoint Objects (List, ListItem, User, ect) using React and PnP-JS Core with SharePoint FrameWork (SharePoint 2016)

I would like to create a WebPart using react and PnP-JS Core with sharepoint framework capable to access SharePoint Objects (such Lists, ListItems, Users, Groups, ect ) in the site where it is ...
6
votes
1answer
1k views

How to perform CRUD Operations on sharepoint lists using React and PnP-JS Core with SharePoint FrameWork (SharePoint 2016)

I would like to create forms using react and PnP-JS Core with sharepointframework to perform CRUD Operations on sharepoint lists. Do you have any simple examples I can look at and test on SharePoint ...
4
votes
1answer
858 views

SharePoint search refinements filters PnP-JS-Core 2.0.7

How can I add multiple refinements filters to Sharepoint search, using PnP-JS-Core 2.0.7 Thanks