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.

2
votes
1answer
10 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
17 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
29 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
31 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
51 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
0answers
38 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
9 views

i Got error form spfx web part [on hold]

Uncaught Error: Multiple anonymous defines in module https://component-id.invalid/bdf62f67-4287-4fff-bfbd-a8a82c262e05_0.0.1/TaskWebPartStrings at l.eval [as reduceRegister_] (eval at (sp-classic-...
0
votes
0answers
26 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
44 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
16 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
221 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
20 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
17 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
29 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
20 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
36 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
43 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
22 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
16 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 ...
2
votes
1answer
23 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
37 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
12 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
30 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
0answers
20 views

SPFX: Custom action to move bulk document from one library to another and adding metadata to these files

My scenario: I need to be able to bulk move files from one library to another and also bulk add metadata to those newly move files. I thinking of creating an spfx/react application or any method is ...
1
vote
3answers
90 views

SPFx Deployment - Failing Gulp package-solution — ship

Update: I was aiming for extenal CDN and I uploaded the artifacts successfully after setting "includeClientSideAssets": false. Still even after adding my app in app Catalog with no error, adding the ...
0
votes
2answers
65 views

Office-ui-fabric-react error TS1005: ',' expected

So the only answers that even vaguely approach answering this seem to be on here. I'm pretty new to SPFX but am trying to build some book examples of React-Redux and I always come up against the same ...
0
votes
2answers
47 views

sharepoint get list item returning wrong date time

i noticed while testing that the sharepoint get list item call i am making through pnp sp is wrong. i tried going to the endpoint url directly to check but the return date is the same (wrong date) . ...
1
vote
1answer
39 views

Add SharePoint Site collection Administrator to SharePoint Online

Is there any way to add a user as Site Collection Administrator in SharePoint Online Sites using Rest API or pnp js?. I am using SPFx react js webpart. I have code in c#, but I cannot use it in my ...
0
votes
1answer
29 views

Possible to track session of user in sharepoint?

i just got a requirement to modify some code in my SPFX app to detect a user sessions. the requirements is that i have to lock that specific list which is tracked by a separate tracking list (schema: ...
0
votes
1answer
43 views

SharePoint Framework Extension Deployment Challenges

I am quite new to SharePoint and want to know if I can create a custom variable(property) in SharePoint Online (may be at site level and Tenant level) and use it in SPFx. I had a requirement to ...
1
vote
0answers
23 views

Custom Action on Command Bar on every page

Is there any way to create a custom action in the command bar on every modern page? Not just in a List or in a Library?
0
votes
2answers
140 views

Error when using MSGraphClient

Today I tested some of my apps created with SharePoint framework and they started to show a errors in the webparts and extensions that use MSGraphClient. Before it was working normally. I am ...
0
votes
1answer
67 views

How to connect react web part to azure sql database? [closed]

Any advice about how to connect a spfx web part using the react template to an azure sql database. But can't seem to find a clear example. I'd be looking to bind controls e.g. Combo boxes to a sql ...
2
votes
1answer
51 views

How to apply a theme to a spfx web part?

I have a spfx web part the gets and displays list items. I'm not sure how to apply a theme to this web part so that the font type and style of the web part title and list items match the rest of the ...
3
votes
1answer
76 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 ...
1
vote
1answer
35 views

SharePoint Framework/ issue/ drop down change event on web part/

I want to use drop down control on SharePoint framework webpart(done) and on change event to call some method/ some rest api and so.but it is not allowing. I did not find any article where spfx web ...
0
votes
0answers
15 views

SPFX include a local JS file - setLike.js

How do I include setLike.js in my SPFX webpart. I have tried a few methods and had no luck so far - what is the correct way to do this?
1
vote
1answer
37 views

SPFX, CSOM for SPO Development

I need to surface some information from SPO within SPO page. I am familiar with on-premise CSOM script webparts where I simply added JavaScript and CSOM code. In SPO, can I still use the same ...
2
votes
1answer
58 views

UI Change in Global Navigation of SharePoint Online Modern Pages

The Global navigation in SP Online classic team sites gets displayed next to the site logo and above logo in Modern Experience. Its easy to modify CSS for classic pages as they are attached to a ...
0
votes
0answers
15 views

SitePages number of Likes (Display and allow user 'like' from a modern page)

I have enabled the SitePages rating feature and set it to likes. I need a way to display something (e.g. a button) on a page that will trigger the current user to like that page. I am using Modern ...
0
votes
2answers
88 views

Getting error 'response.map is not a function' trying to map a list items with managed metadata fields in spfx react solution

I am trying to get items from a links list with managed metadata. I am getting an error 'response.map is not a function'. I have used the sample from this answer to get the data using ...
0
votes
1answer
15 views

Classic pages which use LoadSodByKey('require.js') now fails with a modern SPFX webpart

Classic pages with modern spfx now fails if you load require.js with LoadSodByKey since last week. Any idea how to fix or how to report this to Microsoft? LoadSodByKey("require.js", function () { //...
0
votes
0answers
76 views

SPFx React JS | Bind a dropdown

I have a SPFx React JS web part which populates a grid from SharePoint list. This is working fine. Now, I want to populate a dropdown based on results returned in list. i.e. There is a location ...
2
votes
2answers
140 views

SPFx call a function

We have created SPFx react web part. We want to display data from SharePoint list into a grid. One of the fields is a date field. So need to format the date field. Below is the success function: ...
0
votes
0answers
10 views

is there are way to refresh document library items using spfx extention

is there are way to refresh document library items using sharepoint extension as example,i upload a file through the extension and need to view in Documents folder as this image
0
votes
1answer
39 views

SharePoint Online REST - The HTTP header ACCEPT is missing or its value is invalid

I am building an SPFX web part and trying to get data from a list using REST. Don't want all that noise returned so trying to use odata=nometadata. I've read this and this and plenty of other sites ...
1
vote
1answer
53 views

How to create folder with custom Content Type in REST with SPFx?

I am creating an SPFx solution to create folders with nested folders. This solution is working fine. but I want to attach some metadata to my folder. For this reason I have created a new folder ...
0
votes
1answer
58 views

Can I add an item in a predefined list via listview command set(Sharepoint Framework Extension)?

Using SharePoint Framework extension, I have a list command set for a document library in SharePoint online. On this button being clicked, I want to add an item in a predefined list in sharepoint ...
0
votes
0answers
15 views

Unexpected error in newform form when adding a SPFx webpart in sharepoint 2016

I have a webpart created for sharepoint 2016 using SPFx and when I add this web part on the editForm of a list in sharepoint 2016 then it is working and displayed well. In contrast to add it on the ...