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.

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
32 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
59 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
27 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
153 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
130 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
71 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
40 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
55 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
38 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
155 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
93 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
91 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
121 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
46 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 ...
1
vote
1answer
40 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
173 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
2answers
94 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
18 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
146 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
160 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
1answer
69 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
93 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
81 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
29 views

Open Documents with Library settings in Custom SPFx AddIn

I have to open the Documents based on the Library settings in my SPFx AddIn. I can open the file in browser by using the Window.Open method. But I have to inherit the library settings. If the library ...
0
votes
1answer
69 views

SharePoint online workbench not working using Edge

I'm about to develop a SharePoint modern web part but I cannot test my web part online using Edge (IE 11 works fine). I have deleted the gcb-serve-data folder and reinstalled the cert, still I get ...
1
vote
0answers
26 views

Hide/Remove Item Content Type from a SP List in SPFx

I am using SPFx webpart on SP2016 and able to create a list with custom content type,below is code sample. But I am not able to get any end point to remove default Item content Type. I want my custom ...
-1
votes
0answers
35 views

How to create SharePoint typescript react module

I'm trying to make my own module which allows to create component templates and transpile everything to a single js file to be able to use it as external templates in SPFx webparts. Currently i'm able ...
0
votes
0answers
53 views

Problems loading in external JS SPFX

I am trying to embed a yammer open graph feed into a custom web part using SPFX. I have the following: config.json "externals": { "YammerEmbed": { "path": "https://c64.assets-yammer.com/...
0
votes
0answers
66 views

What's the state of eventAggregator for sharing data in SPFx?

What is the current state of eventAggregator in SharePoint Framework? It can be used to share data between web parts as described in this blog post and demoed on GitHub. Above info is rather old (mid-...
0
votes
1answer
21 views

Power BI webpart not visible when adding it with OfficeDevPnP

I am creating a console app that will create sitepages with certain webparts in it. To Manage this I am using OfficeDevPnP and how I do it is described in the text below. The issue here is that the ...
0
votes
1answer
122 views

react, spfx and taxonomy

I am using react to get the term by id, but the problems is that I am not able to get any child term under the term.For example: -IT --software --hardware IT is term not termSet. taxonomy....
-1
votes
1answer
43 views

How to deploy SPFX in 2016?

I see one JSON file and two js files inside my deploy folder. I have added inside site assets and given the site assets URL in the CDN path, but I cannot find the app in the "Add an app" page. I'd ...
0
votes
1answer
42 views

Is there a yeoman generator for SharePoint Add In's?

I am coming back to Sharepoint development after 6 years. I initially thought that I needed to build a SharePoint Hosted Add-In. I want to build an app that operates within a SharePoint site. It will ...
1
vote
1answer
29 views

Provisioning Lookup field with reference to another provisioned list

I'm trying to provision two lists (List 1 and List 2). List 1 has a Title column and in List 2 i want to create a Lookup field with a reference to the Title column in List 1. The problem is that ...
0
votes
0answers
109 views

why is my fabric react ui people picker returning different properties on item edit?

I have an issue with the fabric ui react people picker. basically, i need to get the userids of the users with this code: public getUserIds(userInfo: any[]): Promise<any> { let resp; ...
1
vote
1answer
27 views

Not specifically SharePoint but JavaScript dev using spfx

Can someone explain to me this: private _getMockListData(): Promise<ISPLists> { return MockHttpClient.get() .then((data: ISPList[]) => { var listData: ISPLists = { value: data ...
0
votes
0answers
30 views

is there property called ''pdfConversionUrl' in sharepoint extension

I found pdf conversion url like this https://northeurope1-mediap.svc.ms/transform/pdf?provider=spo&inputFormat=docx&cs=fFNQTw&docid=https%3A%2F%2Fdenterprise.sharepoint.com%3A443%2F_api%...
0
votes
1answer
74 views

spfx peoplepicker- change state on remove suggestion

I want to change a state when the user remove a person from people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this....
0
votes
1answer
63 views

How do i get current aspx sitepage with SPFx

I have build a webpart with SPFx and using following libraries @microsoft/sp-core-library": "1.6.0 @microsoft/sp-lodash-subset": "1.6.0 @microsoft/sp-office-ui-fabric-core": "1.6.0 @microsoft/sp-...
0
votes
1answer
72 views

How to default select user in People Picker?

I want to set default selected user on people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this._onFilterChanged} ...
1
vote
1answer
52 views

Peoplepicker get all users in tenant

How can I get all of the users in my tenant? I get just the users in a group. This is my code: private _getPeoplePickerItems(items: any[]) { console.log('Items:', items); } public render(): ...
1
vote
1answer
199 views

spfx get value from input

How te get the value from input, i always get the default value from the input field. This is my code: export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps&...
0
votes
1answer
53 views

spfx MSGraphClientt

I need to write a webpart, which shows data from the MS Graph. I wrote this example code import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, ...
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
2answers
74 views

SPFX Web Part Disappears on Save

I have a weird issue. In this one web part, it works when I add it to a page. But it disappears once the page is saved. Additionally, web part properties for the web part also don't persist. Once a ...
1
vote
1answer
31 views

Cannot deploy SharePoint Framework packages anymore after upgrade to SPFx 1.6

Cannot deploy SharePoint Framework packages anymore after upgrade to SPFx 1.6. Few blogs suggested that its because of the webApiPermissionRequests crossing more than 255 characters. Is there any ...
0
votes
0answers
91 views

GroupedList renders checkboxes not in correct way

I use Fabric UI GroupedList component together with Checxbox component, but it seems to work not in correct way. When I put сheckboxes in GroupedList they become to work not as usual. The checkboxes ...
2
votes
2answers
592 views

SPFx Single Page Application

Can you Create a Single Page Application with SPFx yet ? I Want to Create a single Application that can handle (CRUD) several lists.