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 [spfx]

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

1
vote
0answers
5 views

SharePoint 2019 - Web API

Goodnight, I have a WEB API application with windows authentication, and I have an SPFX application in sharepoint 2019. Everything is on premise. How can I authenticate the api with the current ...
1
vote
0answers
11 views

SPFX Sharepoint 2019

I created an app in spfx on sharepoint online and connect to a app service use AadClient. It's possible to do the same in SharePoint 2019 On Premise and On Premise Api?. Thanks
1
vote
0answers
6 views

SPFX- Lookup column value

I'm retrieving data from a SharePoint list and I'm facing some issues while getting values from lookup column. I was able to successfully pull in the 'Title' column which is a single line of text, but ...
1
vote
1answer
18 views

SPFx webpart with Bing Maps

I have SharePoint 2019, and I am trying to create a webpart that will display Bing Map, I tried this on a react app created using create-react-app, and it works fine. Then I took the code, and added ...
0
votes
0answers
12 views

Embed UNC-Path to printer into SPFX webpart

I just started with the first tutorials watching about SPFX. My final goal would be to have a webpart and a button to connect to a network shared printer. The path locally would be \\server1\printer1 ...
1
vote
1answer
66 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, ...
0
votes
2answers
632 views

Add OnClick Event to SPFX Html - No Framework

I have an SPFX Web Part (No Framework) and would like to add an onClick event to my which will call my function swap(). Code: export default class ExpandableIFrameWebPart extends ...
0
votes
0answers
21 views

PictureThumbnailURL managed property returns pixelated roll up image and published image

I have a search function that uses the managed property "PictureThumbnailURL" to return a rollup image and published image. However, these images are very pixelated and low quality. Is there any way ...
0
votes
1answer
19 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
0answers
15 views

Is it possible to access an on-premise Active Directory authenticated REST-API from SPFx solution running in SharePoint 2019?

I know that we can call Azure AD secured APIs (e.g. Azure Functions, or API Apps running in an Azure App Service) from SPFx solutions running in SharePoint Online, as described in these scenarios: ...
0
votes
0answers
16 views

Error in webpart after upgrading to SharePoint Framework 1.8

I have just upgraded to spfx framework version 1.8. When I try to add the webpart to the page, I get this error Original error: Error loading https://component-id.invalid/f2f8e00f-ef2a-4909-b24a-...
1
vote
0answers
19 views

Web api - Http 302 - SPFX

Good afthernoon I have a project in sharepoint framework and a Web API project with Azure AD authentication. In the API I have a controller with Autorize Attribute. If the WEB API runs in localhost,...
0
votes
1answer
29 views

How do I add custom dropdowns in Command Bar in sharepoint modern UI

I am trying to add some of the previous ribbon functionality in the command bar for modern sharepoint UI and stack all of them in separate dropdowns. Any feasible solution will be really helpful.
1
vote
2answers
822 views

httpClient Upload file to SiteAssets

How can I upload a file to the current web SiteAssets or document library using the spfx httpClient? Is there a code sample I can learn from?
0
votes
0answers
13 views

What parameters need to be listed for HTTP Request

I need assistance to determine what the 'Request Body JSON Schema' should be, to allow Flow to trigger via HTTP request to pass the List Item ID as a query string parameter. I am working on a list ...
1
vote
0answers
29 views

SPFX Webpart with Dropdown don't work on Classic pages

I currently have a spfx web-part which contains a dropdown, when I add it to a classic page and try to use the dropdown when the SharePoint ribbon displays the Format Text tab, the dropdown keeps ...
0
votes
0answers
14 views

How to enable SPFx Extension Listview Commandset only on a specific list

As the title says.. Is it possible to show the command only on a specific list and its views?? Because my extension has operations involving only a specific list..
0
votes
1answer
17 views

Prevent Dialog from closing after pressing OK - SPFX Extension Listview Command

I created a spfx extension that shows a dialog using Dialog.alert(`Are you sure you want to open Quarter ${selectedItem.Quarter} for Period ${selectedItem.Period}?`).then(() => { this....
0
votes
0answers
15 views
2
votes
1answer
29 views

Can I convert an SPFx solution that works only on SPO to work on SP2016, 2019 and online without creating a new solution?

Can I convert an SPFx solution that works only on SPO to work on SP2016, 2019 and online without creating a new solution? and what are the differences between the solution the only works on SharePoint ...
0
votes
1answer
26 views

Loading external JS sources prior to any other scripts in SharePoint Framework

Deploping on SharePoint Modern, I am using this React Content Query Web Part and added two of them on the page. One of them will need slick.js and another one is using masonry.js, both of which ...
0
votes
1answer
31 views

Can we create a list definition in SPFx?

Can we create a list definition in SharePoint framework?
0
votes
0answers
31 views

List recently access documents

I am trying to develop a web part the lists the logged on users recently accessed documents, as per the home page of www.office.com, and the recent documents tab. I originally thought this ...
0
votes
2answers
67 views

Call external Web API in SharePoint online using SharePoint framework

I have published Web API from Visual Studio 2017 in Azure portal and I want to consume those data in SharePoint online. I have created one SPFx project file from node js and opened in Visual Studio ...
0
votes
0answers
11 views

How can I connect to on-premises TFS using visual studio code?

How can I connect to on-premises TFS using visual studio code? Is that possible the same way as visual Studio?
0
votes
1answer
21 views

SPFx API calls, getting around threshold when getting data from two related lists

I'm currently trying to create a custom web part to display list items in an easy to read format. This web part essentially uses the REST API to grab the items and put them into a nicely formatted ...
0
votes
2answers
28 views

How to retrieve context in SPFx 1.1.0?

Good morning, I need to create a spfx element to sharepoint 2016. the project dependencies are: "react": "15.4.2", "react-dom": "15.4.2", "@types/react": "0.14.46", "@types/react-dom": "0.14.18", "@...
0
votes
1answer
24 views

Can we package the branding files, custom masterpage and custom layouts and upload them to SharePoint using SharePoint framework (SPFx)?

Is it possible to package the branding files (CSS, JS, images, ..), custom masterpage and custom layouts and upload them to SharePoint using SharePoint framework (SPFx)?
5
votes
2answers
763 views

Can I target an existing column with a Field Customizer extension in SharePoint Framework?

When creating a FieldCustomizer extension as per the examples given, the process creates a new Site Column to which the customizer applies. I want to create and deploy an extension that targets an ...
5
votes
1answer
248 views

SPOnline, How to Batch RELATED REST calls (and increase performance)

Doing nothing fancy, just your normal Intranet Front-Page Got two WebComponents that display a News Carousel and Summary List <news extract="newsheadlines" display="carousel"> <news ...
0
votes
1answer
20 views

How to trigger Microsoft Flow using SPFx Extension's ListView Command set

As the title says, How to trigger Microsoft Flow using SPFx Extension's ListView Command set? Has anyone tried this and get it to work? Please guide me to achieve this.
11
votes
3answers
2k views

How does one pass parameters to SharePoint Framework Extensions in practice?

I am currently in the process of getting up to speed with SPFx and have gone through the Extensions Getting Started guide of the official documentation and skimmed a fair portion of the other ...
2
votes
1answer
48 views

Replacement of QueryString web part in SharePoint Modern UI

Is there any replacement of QueryString Web Parts in Modern UI? SPFx is the last option.
3
votes
2answers
621 views

How to get the URL for a selected document in a sharepoint framework extension spfx

How can I obtain the URL for a selected document in a sharepoint framework extension? e.g. a friendly url or unique reference that a user can use to open the selected document; https://mysite....
1
vote
1answer
57 views

Update List Item SPfx not working

Below is the code, which is not working, shows below error An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. const body: string = ...
0
votes
0answers
12 views

SPFx Web part not retaining the Property values

I have a SPF'x web part (SPF'x V1.1 as its for On premise) which has 2 string type of properties. It was working fine in my QA environment. But in Prod, The properties not retaining the values. I have ...
0
votes
0answers
14 views

Athenticate and Authroize External API

I am writting a .Net API, which will be consumed by a SPFx(Sharepoint Online) webpart. I need that API can authenticate and authorize via CSOM, because some of methods of these API need to be ...
0
votes
1answer
21 views

Document Set update properties

Hi i am trying to create documentset and set the properties from a webpart. I can create the document set private async _CreateFolder(webUrl,listName,folderName,folderContentTypeId,folderPayload, ...
0
votes
2answers
374 views

client webpart multiline displays as one line only

I am trying to create a multiple line webpart property using this code: PropertyPaneTextField('test', { label: 'Multi-line Text Field', multiline: true ...
3
votes
1answer
1k views

Office-ui-fabric-react : error in components & BaseComponent.d.ts file

add office-ui-fabric-react package in SPFX react webpart using <!-- language: lang-ps --> npm --save install office-ui-fabric-react then add <!-- language: lang-ts --> import { ...
0
votes
1answer
25 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
3answers
724 views

Using bootstrap tabs in sharepoint framework

I am new to sharepoint framework and I have tried to bring the bootstrap tabs design in sharepoint framework. I am able to load bootstrap.css and bootstrap.js and also the design is coming but the ...
3
votes
2answers
760 views

Office UI Fabric DetailsList(React) rendering: DetailsColumn.render() error

I am trying to add a very basic implementation of the Office UI Fabric's DetailsList React component to my project, but keep on getting the following error when trying to render it: 'DetailsColumn....
2
votes
1answer
43 views

How to find SharePoint Version & SPFx can be used?

In order to use SPFx, it mentions that "SharePoint 2016 Feature Pack 2" is required. I have SharePoint 2016 On Premise. But how to find out what version and feature pack is currently installed. I ...
0
votes
2answers
33 views

How to clear Office-ui-fabric-react fields after object has been added to list?

I have a simple list that gathers info from two text fields, a drop down and a people picker. I am able to submit to my custom list. I have set the state back to the defaultValue, which I have defined ...
1
vote
2answers
34 views

Issue while retrieving data in SPFX

I am trying to get data in SPFx using REST and also need to use CAML for making the query. CAML is required as I want to filter based on certain groups the user is present in, so giving that up is not ...
1
vote
0answers
30 views

How Can I add a Content Type to a Document Library using SPFx

I have a Content Type for a Document Library that resides in a Content Type Hub. It's available on the team site. Now when a Library is provisioned, I would like this content type to be added. Can ...
1
vote
1answer
59 views

Problem with rendering a React component in another component for SPFX

This is my first post here, I guess :) I am writing because I have a task to make a Shopping app which should be made in SharePoint Framework and use React as a framework. My current problem is ...
1
vote
3answers
2k views

Local gulp not found when executing gulp serve

I have downloaded the spfx samples from github and I am running into this problem when I execute gulp serve. λ gulp serve [12:39:37] Local gulp not found in C:\react-todo-basic [12:39:37] Try running:...
0
votes
1answer
862 views

gulp package-solution --ship not building sppkg file

A Spfx webpart was made , it was build by using gulp bundle --ship command with no error then gulp package-solution --ship was entered in cmd to get sppkg file but 3 errors came Error - Error: The ...