Questions tagged [spfx-webparts]

Technical questions about building and using web parts based on the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
1 vote
1 answer
1k views

gulp serve error

I'm trying to work on a project of a SPFx web part. The project was built normally but when I try to test my web part on my tenant the following error occurs: Error: Your dev environment is running ...
Lidia's user avatar
  • 11
0 votes
0 answers
18 views

When we do save as draft we are getting old field value for the property pane field , why its happening and how to get latest value on save as draft?

We are having GUID in the webpart property pane, But when we edit that in sharepoint page its giving correct value but on save as draft , again the previous value is getting populated for the guid, ...
Vivek Chadha's user avatar
1 vote
1 answer
2k views

How do I pass HTML table inside mailto in anchor tag?

I am creating a web part in SharePoint Online using SPFx REACT framework and I want to open an email pop up with an HTML table in the body section of the email. Currently, I am using mailto to open an ...
user20815589's user avatar
0 votes
1 answer
203 views

Can we execute a python script within SPFX webpart

I have a python script which uses some python libraries to do decrypting and encryption . Is there a way where I can invoke this script inside the webpart code.
Sathrya Selvin's user avatar
0 votes
0 answers
223 views

How can we add a SPFx webpart to an application page in SharePoint 2019?

We are trying to add a SPFx webpart to an application page but are encountering some issues. The steps we have taken are the following: We create a new web part page in SharePoint designer and add ...
Ilyas's user avatar
  • 1,341
4 votes
1 answer
669 views

How do I upgrade an SPFx web part to the newest SPFx version?

I found a web part to show and print PDF docs from SharePoint, and it seems to support the swipe gesture too. The code is for SPFx v1.12. I'm thinking about upgrading to v1.16 first. What would I need ...
Thomas C's user avatar
0 votes
0 answers
67 views

Display custom avatar instead of OOTB in SharePoint Online programatically

I am showing user profile pictures in my SharePoint portal for all logged in users. For the users who uploaded their pictures its showing fine, but for the users who do not uploaded their pictures its ...
Chillax Designs's user avatar
0 votes
0 answers
228 views

SPFX Webpart on classic page: Uncaught Error: Mismatched anonymous define() module

I am experiencing an error with a custom React SPFx Webpart on a classic site. Sometimes on page refresh, a large error message stating that there is a mismatched anonymous define() module. Whenever ...
draju-aa's user avatar
0 votes
0 answers
357 views

Error while using the Slider from React-Slick in SPFX webpart

I am trying to use react slick Slider in my SPFx web part as below. import React from "react"; import Slider from "react-slick"; export default function SimpleSlider() { var ...
Kailash Sahoo's user avatar
0 votes
2 answers
196 views

How to get current page URL in SharePoint page through web part?

I tried using the window.location.href, its not working when the webpart is deployed in the production environment How to get the current page URL on the SharePoint web part?
Vivek Chadha's user avatar
0 votes
1 answer
4k views

Unable to resole Module '"@pnp/sp"' has no exported member 'spfi'

I have an SPFX solution where I tried installing 'npm install @pnp/sp --save' Now, while using 'import { spfi } from "@pnp/sp"' I am getting below error. '"@pnp/sp"' has no ...
Kailash Sahoo's user avatar
3 votes
1 answer
949 views

Unable to resolve "@pnp/graph"' has no exported member named 'graph' in SPFX solution

I have an SPFX solution where I am trying to use Graph API. I tried installing 'npm install @pnp/logging @pnp/core @pnp/queryable @pnp/graph --save' Now, while using 'import { graph } from "@pnp/...
Kailash Sahoo's user avatar
1 vote
1 answer
42 views

Alternate data result SPFX

Hi all I'm trying to build an spfx webpart for project server 2019 (on prem)... Everything it was working good, I used this css but now I faced an interesting question, css have two elements container ...
Douglas Filipe's user avatar
0 votes
1 answer
1k views

OAuth authentication for SPFx solutions

I am challenged by a SPFx based solution (WebPart as well as Commandbar-Extension). I have a set of APIs which are secured by OAuth. There is a dedicated authentication server, so I can't just use ...
nyn3x's user avatar
  • 355
0 votes
1 answer
152 views

Getting [object object] in spfx search box value

I am working on spfx webpart which will send search value to url and append to show the results in enterprise search below is my code but every time i enter search value it always return [object ...
Ashok 's user avatar
  • 49
0 votes
1 answer
988 views

Cannot find module '@microsoft/sp-application-base' or its corresponding type declarations

I am working on spfx webpart and getting below error when trying to run my solution Cannot find module '@microsoft/sp-application-base' or its corresponding type declarations then i tried installing ...
Ashok 's user avatar
  • 49
0 votes
1 answer
731 views

The command gulp serve don't work

when i get up my local server with the command(gulp serve), instead the show in the browser my first web part it create a files.
santiago arboleda martinez's user avatar
1 vote
1 answer
369 views

Can we build a web part similar to the Quick Links web part which check if the user have permission on the related links (internal and external links)

I am working on a project to build a portal inside SharePoint online. Now i got this requirement:- To build a quick links web part (similar to the built-in modern Quick Links) But this quick links ...
John John's user avatar
0 votes
1 answer
118 views

SPFx solution adds a # in the main URL

I am new to SharePoint and SPFx solutions. Recently I created an SPFx solution which is basically a react spa application which replaces the homepage of the SharePoint site. But the solution adds '#/'...
Treesa's user avatar
  • 101
2 votes
0 answers
38 views

How can i search second or third word on PeoplePicker?

I have a peoplePicker on my sharePoint project, *react, and I am using this for search users or groups. I can find all.. but there is an another problem. It's okay if I write the words in order but if ...
ceren's user avatar
  • 23
0 votes
0 answers
174 views

Sharepoint Online SPFx error on all webparts : Something went wrong -> Mismatched anonymous define() module

Error on sharepoint online SPFX webparts as, Something went wrong -> Mismatched anonymous define() module
Priya's user avatar
  • 39
0 votes
1 answer
146 views

App Configuration Page

I have create a SharePoint WebPart as well as a CommandBar-Extension using SPFx. I used the yeoman generator to schaffold the application and finally created a sppkg-file I can deploy to my app-...
nyn3x's user avatar
  • 355
0 votes
1 answer
272 views

Build custom SharePoint home page using SPFx

I need to customize home page of my SharePoint site online using SPFx (custom list, widgets.....) Can you please provide me some tutorial to do that?
SPOuser's user avatar
  • 15
1 vote
1 answer
912 views

Sharepoint Online every SPFx web parts get this error : Something went wrong -> Mismatched anonymous define() module

I have SharePoint online sites and some spfx web parts. These sites are created with publishing site templates and web parts have been working for months. I rarely got this error "something went ...
Nuri Durmuş's user avatar
0 votes
1 answer
65 views

Can an OOTB SPFx Web part consume a custom SPFx Web part component exposed data?

Can an OOTB SPFx Web part consume a custom SPFx Web part component exposed data? https://learn.microsoft.com/en-us/sharepoint/dev/spfx/dynamic-data
fallout's user avatar
  • 1,005
0 votes
1 answer
57 views

Unique permission on 40000 document in a document Library

I need to migrate a FTP into SharePoint, its having around 40000 document in total. Now concern is this that each document will be having unique Read permission to multiple users and O365/SharePoint ...
cjs's user avatar
  • 1,204
1 vote
1 answer
259 views

Get AAD Roles from React SPFx Webpart

I have a simple React SPFX Webpart. We have deployed it to our SP Online site. It currently displays the SP Groups of the current user. const queryUrl = `${this.context.pageContext.site.absoluteUrl}/...
Bobby Ortiz's user avatar
5 votes
1 answer
4k views

"Either Guest user or Cortex is not enabled!" on SP page

I get this error: "Either Guest user or Cortex is not enabled!" in the browser's developer console when I run my published webpart. It first appeared around October 26th 2022. The error ...
Vincent Gagnon's user avatar
1 vote
0 answers
238 views

Is there any way to refresh the page from webpart when user clicks on save as draft in sharepoint page?

We have implemented some webpart where filtering is happening when user select some value from the dropdown and its working fine but when we click on save as draft at that time old filter value is ...
Vivek Chadha's user avatar
1 vote
1 answer
546 views

Any way to display category in SharePoint online news article web part

Need to display the category in the news article in the red box of the OOTB features in SharePoint Online. For example I have the category for the news: Sports news Technology news Can I display it ...
Just click's user avatar
1 vote
2 answers
1k views

Uploaded SPFx app not deploying - unable to add to site

I created a simple SPFx web part, bundled and created the solution package using the following commands. gulp clean gulp bundle --ship gulp package-solution --ship Then uploaded the .sppkg to my app ...
juzz_dooit's user avatar
0 votes
2 answers
1k views

Is it possible reverse engineer sppkg file? I mean extract source code from .sppkg file

I'm looking at changing an existing webpart. But unfortunately there is no source code stored any where. Is it possible reverse engineer sppkg file? I mean extract source code from .sppkg file. Thanks ...
naijacoder's user avatar
  • 4,232
0 votes
1 answer
18 views

How to brand SharePoint addins

I'm building some SharePoint add-ins. Some are SFPx web parts, others are SharePoint hosted add-ins. How to customize icons and pictures for these applications ? I'm looking for : change the icon in ...
Steve B's user avatar
  • 7,488
1 vote
1 answer
75 views

how to delete item comments with PnP?

How can I make the delete() function of the IComments interface work? The promise of then() returns an ICommentInfo interface and delete() doesn't work.
SiCaMa's user avatar
  • 15
1 vote
1 answer
158 views

Is there any alternative to add an app in SharePoint team site without adding to App Catalog site?

I have SharePoint Team Site Administrator-level permission. I don't have App Catalog site permission and I don't have SharePoint Administrator-level permission. So, I can not create a site-level App ...
thedeepponkiya's user avatar
0 votes
0 answers
220 views

How to validate a manifest of an SPFx webpart to publish it to Marketplace?

I'm now researching publication of the solution to Marketplace/AppSource. Here it's said that I can do that with an SPFx app, and as I understand, webparts are one of possible solution types: https://...
Michael Yegorov's user avatar
0 votes
1 answer
121 views

Web part with Persona stopped working

I have a SPfx web part that uses the Persona component. That component just started failing on SharePoint Online in the last day or two. It still works in my localhost workbench, but fails on ...
Randy Slavey's user avatar
0 votes
1 answer
340 views

pnp-js Unable to update file in subsite 403 error

I am trying to update a file in document library from webpart, code is working fine for site collection but not working for subsite, getting below error message Error: Error making HttpClient request ...
user4205's user avatar
  • 571
1 vote
1 answer
202 views

Getting webpart panel properties in .tsx file

I have created a basic SPFx webpart. Essentially the I'm making a call to a 3rd party API and getting some values back and then rendering the results on the screen. The .tsx file is below. import * as ...
RobI's user avatar
  • 11
0 votes
2 answers
1k views

From Azure Function (secured by AAD), how to properly detect the caller (the end-user of SPFx WebPart) through the AadHttpClient?

Note: Both Azure Function and the SPFx WebPart mentioned below are written in NodeJS/JavaScript. None of them are in C#. I have an Azure Function (secured by AAD: App Registration) which is being ...
夏期劇場's user avatar
0 votes
1 answer
309 views

Using Moment react in an array and then format Date

I want to format a Date (StartDate and EndDate) in Moment React. Unfortunately, it's always giving me an error message. Maybe you can help me! Here is my code so far: this.state.ProjectFilterItem....
Matthias's user avatar
0 votes
1 answer
148 views

Call a function dependent on the value inside an array with SPFx and react

I coded a template that pushes values from a SharePoint List into an array. I want to change the image inside the array depending on a value that is inside an array. The value should function like a ...
Matthias's user avatar
0 votes
1 answer
582 views

SPFx solution required hard refresh

I have deployed the SPFx solution on SharePoint. Changes are not updated until we hard refresh the page. Need the solution for auto refresh the site page.
Shreya's user avatar
  • 55
0 votes
0 answers
181 views

MGT PeoplePicker selectionChanged event parameter type

I am creating a SPFx web part and I am using the Microsoft Graph Toolkit PeoplePicker. It offers a selectionChanged callback. This callback gets passed a parameter of type Event (defined in typescript/...
mario.b's user avatar
0 votes
0 answers
168 views

PNP/SP not working in team context

I have created the SPFX tab webpart with crud Operation in sharepoint list Not working in Microsoft teams app but this webpart working in sharepoint page because its getting SharePoint context I am ...
abhishek23 Negi's user avatar
0 votes
1 answer
222 views

Help with SPFx and Dataverse

I'm trying to do CRUD functionality on a Dataverse table from an SPFx app. I keep getting the same error: To view the information on this page, ask a Global or SharePoint Administrator in your ...
Ben Hester's user avatar
0 votes
1 answer
38 views

What is the best way to shuffle the results that come back from a Graph query?

I have an SPFx web part for SPO which gets the members of a team. What's the best way to shuffle the 'result' data that comes back? EDIT: I have tried this: result = result.sort(() => Math.random() ...
Pete Whelan's user avatar
0 votes
1 answer
238 views

Custom SharePoint online page flicker on load SPFX web parts

I have created an application customizer extension and put my custom header and footer in that extension which loads fine. I had to hide the OOTB ribbon and left bar as I wanted to have totally ...
Muhammad Zeeshan Tahir's user avatar
0 votes
1 answer
534 views

How to call a JavaScript function defined on the page from within an SPFx webpart

Updated: I created a basic SPFx webpart using "yo @microsoft/sharepoint", etc. with typescript version 4.5.5. There are JavaScript functions that are global in the page scope. I need to be ...
Scott Byrge's user avatar
0 votes
1 answer
646 views

How can we add custom button in Microsoft team

Is there any way to add a custom button in Microsoft team channel to open a popup where we can do the insert operations with SharePoint list? Below is screenshot example:
abhishek23 Negi's user avatar

1 2
3
4 5
26