Stack Exchange Network

Stack Exchange network consists of 174 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
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [pnp-js-core]

The tag has no usage guidance.

4
votes
1answer
31 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 '...
1
vote
0answers
32 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
54 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
21 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
35 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(...
0
votes
1answer
64 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 ...
3
votes
1answer
126 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 ...
2
votes
2answers
48 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
108 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 ...
0
votes
1answer
39 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
178 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....
1
vote
3answers
187 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
96 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
67 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
93 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 ...
2
votes
2answers
269 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 ...
3
votes
3answers
223 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 ...
2
votes
0answers
57 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 ...
0
votes
1answer
41 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 ...
1
vote
1answer
283 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....
0
votes
0answers
44 views

Getting OneDrive API access from webpart

I've been trying for hours to access the REST API within OneDrive for Business from a webpart (in SPO), but without any luck. (Even with JSOM I'm getting the same result). So, I really thought this ...
0
votes
0answers
36 views

Control exceptions uploading a file using PnP.js addChunked() method

I'm using PnP.js for uploading a file in chunks, but I couldn't find continueupload() nor cancelupload() method to control exceptions in PnP.js. It seems those methods are not exposed as public or as ...
0
votes
1answer
427 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 ...
1
vote
1answer
76 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
0answers
37 views

Can we change language preferences using Javascript , Pnp js in SharePoint Online. #1636

Can we change language preferences using Javascript , Pnp js in SharePoint Online. How much time does it take to reflect the changes Basically i need to a dropdown where i can list the languages . ...
0
votes
0answers
149 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 ...
0
votes
0answers
19 views

How do I Inject Core.EmbedJavaScript.HeaderFooter without Microsoft Visual Studio?

I am looking at creating an universal Header and Footer on SharePoint using Core.EmbedJavaScript. However, my company doesn't allow me to install Microsoft Visual Studio. How do I go about injecting ...
1
vote
1answer
152 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
198 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
0answers
87 views

SharePoint Search Refinements Filters

How can I add a refinement filter to Sharepoint search? I need to get results when a field is null or empty I'm using PnP-JS-Core 2.0.7 Thanks.
0
votes
1answer
699 views

How to get all Users to populate a People Picker Control using PnP JS Core (SharePoint Online/ SharePoint 2016)

Can I use PnP JS library to get all Users to populate a People Picker Control ? Regards, Arioule
0
votes
1answer
222 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 ...
0
votes
1answer
538 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 ...
-3
votes
1answer
558 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 ...
0
votes
1answer
647 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 ...
5
votes
1answer
807 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 ...
2
votes
2answers
1k 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.
0
votes
1answer
46 views

GetSelectedItemIds using pnp.js.core

In JSOM we have a method called SP.ListOperation.Selection.getSelectedItems() How do I do this using pnp.js.core?
0
votes
1answer
516 views

Delete documents in a document library with pnp-js-core

How can I delete a document in a document library with Pnp-Js-Core, but I need the registry to be stored in the recycle bin. Thanks.
2
votes
1answer
293 views

SPFX - PnP JS Core for SPFx On-Premise v1.0.2

I want to use PnP JS Core in SPFx v1.0.2 React webpart for SP16 On-premise server . What is the version of pnp need to use and how to install it? What are the other options for accessing data in ...
0
votes
1answer
593 views

Sharepoint Online Search - PnP-Js-Core

I'm doing a SharePoint search and I need specifically select Title field, but, some times the result is the title of the document and not the Title field of the library or list I'm using PnP-Js-Core ...
3
votes
1answer
2k views

pnp.sp.site.getWebUrlFromPageUrl method is returning wrong web URL

I am using sp-pnp-js for my spfx project. GetWebUrlFromPageUrl method is returning wrong URL that includes sitePages also. Please refer: my current page location is https://xxxx.sharepoint.com/sites/...
4
votes
1answer
644 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
1
vote
2answers
2k views

Sharepoint Online upload files to library with PnP-JS-Core 2.0.7

How do I upload a file with all properties or fields values to a sharepoint library? I'm using PnP-JS-Core 2.0.7 Thanks!
4
votes
2answers
2k views

SPFx - PnP-JS-Core - Check if list exist in current web

I want to check if list(by Display Name) exist in current web. In pnp developer guide is no information on how to work with lists? I need this for validate web property and i want to use pnp-core-...
3
votes
1answer
5k views

SPFx - How to get current user properties with PnP-JS-Core [duplicate]

I want to get current user login name with PnP-Core-Library for SPFx in Office365. My page is modern Page аnd I can not use it _spContextPageInfo How to do this?
2
votes
1answer
225 views

Is it possible to set the decimals on a Number field?

I'm trying to update number fields to hold only 1 decimal place but I can't seem to do this through REST. I tried Pnp Js but it's not working, there's no error, it just doesn't update: pnp.sp.web....
3
votes
2answers
1k views

How to make Pnp function async in spfx framework

I need to get data from a function as below. GetServiceListData():any { var resultData; pnp.sp.web.lists.getByTitle('Test').items.select('Title,FullName,DOJ,ManagerName/Title').expand('...
4
votes
2answers
352 views

CSR jquery append not working on list items after async query

Hello i got some trouble displaying some icons inside a column using CSR, what it should do is to check for the contents inside a document set and if the content is equal to a content type and add a ...
0
votes
0answers
705 views

SPFx - Template for email with PnP Core Library

With SharePoint Framework I use PnP Core Library to send mail to another user: import pnp, { EmailProperties } from "sp-pnp-js"; const emailProps: EmailProperties = { To: ["user@site.com"], ...