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

Questions tagged [spfx]

General technical questions about the SharePoint Framework client-side development model.

1
vote
0answers
11 views

Failed to execute 'json' on 'Response': body stream is locked

I am following this article and get the following error in the console.log Uncaught (in promise) TypeError: Failed to execute 'json' on 'Response': body stream is locked at e.json (sp-pages-...
0
votes
1answer
32 views

A service principal with the name User Details Custom API for SPFx

I am consuming an Azure API app in a SharePoint Online react app. I am following this article. But when I try to approve the app permissions on the API management page (SharePoint admin centre). I ...
0
votes
0answers
18 views

Provisioning SPFx WebPart assets: adding a page with your webpart embedded to it

As far as I can see it should be doable to create a package which can automatically, once the app is added to your site, to create a page and embed the webpart on it - as described here: https://...
3
votes
1answer
29 views

NodeJS not compatible

when I run gulp serve I get the following error. Your dev environment is running NodeJS version v10.15.0 which does not meet the requirements for running this tool. This tool requires a version of ...
0
votes
1answer
21 views

Sharepoint (SPFx): APIs working on workbench but on modern pages the /sitePages/ path appears

I'm fairly new to the sharepoint framework so this maybe something quite fundamental that I have misunderstood but here goes: I'm working on a sharepoint framework typescript / react webpart that ...
0
votes
0answers
16 views

how to set the actual webpart code as initial value in PropertyFieldCodeEditor - SharepointFramework

Hello i am using this custom property pane control called PropertyFieldCodeEditor. what i want is to display the actual webpart code as the initial value of the code editor, then after i click save, ...
0
votes
0answers
13 views

Sharepoint SPFx active toggle in list view

I'm new with SharePoint Framework and I want to achieve something like this: Github - React Field Toggle This solution is for SPFx v1.3 and in my environment (SharePoint Online) it's not working even ...
1
vote
1answer
32 views

Can I use SPFx 1.7 with Sharepoint 2016 Feature Pack 2 updated to the latest January 2019 patch?

We have an on-prem Sharepoint 2016 server which has been kept up to date with the latest security and feature updates and patches. We want to build a client application using SPFx Web parts, ...
1
vote
1answer
14 views

Get current folder within SharePoint document library with @pnp/sp

I need to get the folder name within a document library, within the ListCommand spfx extension. Is there a way to do that with REST ? can I use @pnp/sp ? I have imported the project with : import { ...
0
votes
1answer
33 views

How to add checkboxes to propertypane dynamically

I have a dropdown on my property pane which i populated with sharepoint lists. What i want to do now is to add the columns(fields) of the list(selected on the dropdown) as checkbox(on the property ...
1
vote
0answers
28 views

Why can't PowerApps see my Custom SharePoint Lists?

I've been working on a PowerApp which uses SharePoint Lists to store its data. When I manually create the lists within SharePoint, I can see these when adding the Data Source in PowerApps - however, ...
1
vote
1answer
30 views

Cannot read property of undefined in spfx

Hear is a SPFx react webpart ".tsx" file code image Have you any solution ?
0
votes
1answer
25 views

SPFx - Accessing/appending markup that has been entered in via a property pane text field to webpart

I am currently working on an SPFx webpart. Within my property pane I have: PropertyPaneTextField('CreateNewVerticalNav', { label: 'Create New Vertical Nav', multiline: true, ...
0
votes
0answers
33 views

package error when building spfx webpart

I am using the following breadcrum sample. To reproduce the error use command: gulp serve Error I got: ./src/extensions/siteBreadcrumb/SiteBreadcrumbApplicationCustomizer.ts Module parse failed:...
4
votes
1answer
51 views

Should I rewrite all the existing jquery ajax webparts in Typescript or is it better to inject existing jquery in SPFX?

We are moving from SharePoint 2013 to SharePoint Online. We are thinking of migrating existing webparts in 2013, which have jquery - ajax, to SPFX client webparts. Do we have to rewrite all the code ...
0
votes
2answers
31 views

CSOM CAML displays all fields

I would like to reduce the no of fields that I get from CAML query. The List has more than 100 fields, which is causing a lot of performance issues. In SSOM the SPQuery object has a query....
0
votes
1answer
49 views

Using Office Fabric UI icons in a SPFx extension

I want to add an icon to one of my buttons on my SPFx list extension. In the JSON, I can amend this for an url for an icon to my CDN, but how about if I just want to use office fabric UI, any ideas? "...
4
votes
1answer
132 views

Does Virus affected Node Modules transfer in Contents of SPFx deployment package

When we scaffold an SPFx webpart/Extension we get many Node Modules as part of dependencies. These can be seen in node_modules folder and there are also entries in package-lock.json file. I know ...
1
vote
0answers
15 views

Alignment wrong on a SPFX web part

I am newbie on SPFX with react but I have created this : but I need to align the left hand label with all the command buttons and get the background colour the same, the id label is a little bit ...
0
votes
0answers
23 views

Extension working in layout pages but no longer working anywhere else

I've developped a custom Extension with SPFX. This custom extension performs a Search. I deployed it. Everything worked totally fine during 6 months. And now, out of the blue, my extension is only ...
0
votes
1answer
41 views

Multiple attachment upload causing 409 conflict error. (SPFX, PNP)

I have noticed a bug when using the PnP library for SPFX to upload multiple attachments. Using: sp-pnp-js@3.0.10 targeting: SharePoint Online Expected Behavior Question When uploaded multiple ...
0
votes
1answer
20 views

what is supposed to be the return of getTermset in pnp/sp-taxonomy

I am using pnp sp to retrieve the termset, i am using this: const store: any = await taxonomy.termStores.getByName("Taxonomy_9D1X5aueEcT7a3LKqetQKw=="); const sets: ITermSets = taxonomy....
2
votes
0answers
24 views

MS Graph API - Problems on SPO Mobile-App

The Background: I am developing Sharepoint Online Webparts on-demand. Sometimes the functionality of these Webparts include the use of Microsoft's "Graph-API" to access Data regarding Office 365 ...
1
vote
0answers
19 views

SPFX Angular Element with UI-Router not displaying data

Iam testing Angular Element with SharePoint Framework (SPFX) Webpart, as Andrew Conell has described in his Blog Every thing is working as asspected, i have added UI-Router in webpart just for ...
1
vote
1answer
27 views

SPFX how to add a readonly field to a Content Type [closed]

I need to create a List with an asset package with spfx. The list must contains 10 Columns that can not be edited by users but will be modified by buttons added with an spfx extension. How can I do ...
0
votes
1answer
32 views

Spfx dropzone component

I am using the sample react-file upload sample and upon and upload am changing the metadata of the file. The catch is it is working when am testing and when the app is deployed it no more works.The ...
1
vote
1answer
27 views

How can I create webpack package of SharePoint online for react App?

I can create package of react app for SharePoint online by using "gulp serve" and "gulp package-solution" commands. However, I want to create package by using Webpack. How can I achieve this?
0
votes
0answers
21 views

How to load all SPFx webpart on a page after a rest call complete?

I am making a rest request to get user groups and that is required in each SPFx webpart to do some further operation. Scenerio - If 6 SPfx webparts are added on a page and each SPFx webpart is ...
2
votes
1answer
15 views

Trouble getting SPFx up and running on Ubuntu

I'm having trouble getting SPFx up and running on Ubuntu. I'm using the following commands sudo apt-get install nodejs -y sudo apt-get update -y sudo apt-get install build-essential -y sudo npm ...
1
vote
1answer
62 views

SharePoint Framework Deployment error: failed to load URL from CDN

Background: I occasionally have all instances of a webpart fail after deploying a change. The webpart was recently built using the latest SharePoint framework. The gulp trust-dev-cert command was run....
0
votes
0answers
47 views

Access SharePoint List using Client ID

I am accessing SharePoint online list data using the following code but i get the following error. The remote server returned an error: (403) Forbidden. The web forms application is running in ...
1
vote
2answers
44 views

SharePoint Online Rest: Lookup Values visible in list, ID column does not reveal the Ids of the item

I have an odd issue today. When looking at a list I can see the lookup field is populated with an item, this is one of a few lookup fields on the list. However when I look at the results of a rest ...
2
votes
1answer
193 views

SPFx calls blocked by CORS policy

I'v been trying to access various apis through SPFx and I am constantly seeing this issue. I do not know how to fix this can anyone assist or explain what I am doing wrong or missing? This works ...
2
votes
1answer
116 views

SPFx Office UI React - How to default select user in People Picker

On componentDidMount I have received the current logged in user using MSGraphClient. I have saved the object that I received from graph in fullObject variable. I am using below code: <...
0
votes
0answers
174 views

Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request

I'm trying to make a call to Slack by building the request inside SPFx webpart. I get this error: Access to fetch at 'https://slack.com/api/users.list/?token=xoxp-...
1
vote
0answers
65 views

SPFx web part is not loading in IE 11

I have a SPFx web part with Knockout framework. Its developed for SharePoint on premises (V1.1.0). Deployed all the Assets in the SharePoint library. Application is working fine in Chrome. But in IE, ...
0
votes
0answers
23 views

web part uses default values instead of new value from propertypanetextfield

I am using a react web part. I don't understand why my web part is using the default value instead of updated value from the propertyPanetext field. Isn't this behavior supposed to be reactive. There ...
4
votes
2answers
244 views

Create modern team site in SPFx

I found some articles which are explaining creating modern sites with CSOM. But I am not able to find in JavaScript to use in SPFx. Creating modern sites is supported with SPFx? Any PnP extension ...
0
votes
1answer
24 views

Content Collaboration system user rating SPFX

we were tasked to create a system in which users have the ability to rate a content using the star rating. i understand that sharepoint has an ootb functionality for the star rating however it just ...
0
votes
0answers
18 views

The connection was reset : SPFX

I keep getting this connection was reset error when i try to deploy a spfx webpart to the local workbench. My current node version is 8.11.4. I have set NODE_NO_HTPPS=1,change the ports to 8080,...
2
votes
1answer
54 views

View SPO Modern list in SPFX

I'd like to ask if its possible to achieve something like this -> https://collab365.community/create-manage-sharepoint-list-teams-tab/?fbclid=IwAR0FhFIvH9S51ZNvJbcR_dtFzl0Xe2zljyNP-...
2
votes
0answers
27 views

Office-UI-Fabric Pivot with React Router? Possible or not?

I face real challenge (at least for me) so I decide to ask for some help here. I'm building SPFx app where I'm using Pivot from UI-Fabric and I would like the current user to be able to navigate back ...
1
vote
0answers
50 views

Sharepoint ribbon and navbar font color not working when applying theme in Sharepoint Online

With the following script i set a theme in a sitecollection Connect-PnPOnline -Url https://mySP.sharepoint.com/sites/test2 -Credentials $script:psCredentials Set-PnPTheme -FontSchemeUrl _catalogs/...
2
votes
1answer
91 views

spfx context undefined

in my react component i use msgraph but i get the message "cannot read property 'context' of undefined" My code: this.context.msGraphClientFactory .getClient() .then((client: ...
1
vote
1answer
29 views

Terminate batch job in SPFx

In spfx, If we press 'ctrl+c' during any continue process then display a message 'Terminate batch job (Y/N)?' you press Y for yes and N fro No, but both the case y and N terminate the batch job. so it ...
1
vote
0answers
42 views

DetailsList component row rendering issue

There is a DetailsList component inside spfx webpart, which loads all the documents/files using PnP. There is a office-ui-fabric-react check out button outside DetailsList component. When I select ...
2
votes
0answers
20 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 ...
3
votes
3answers
90 views

automate spfx packaging including selected components

Description and objectives: I am trying to figure out a "best practice" guidance on this topic: We are planning to create a "self-service" packaging solution, the idea behind is sort of selecting a ...
3
votes
2answers
77 views

force user to add metadata when uploading docs

I want that my users are forced to enter metadata when they upload/bulk upload document.When bulk uploading document it would be cool that users add the metadata once and it applies to all the files
0
votes
0answers
29 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(...