3
votes
How do I upgrade an SPFx web part to the newest SPFx version?
You can use CLI for Microsoft 365 to upgrade your SPFx project/solution to latest SPFx version.
You have to use project upgrade command for the same like:
m365 spfx project upgrade [options]
Check ...
2
votes
Accepted
How to use TaxonomyPicker Control with Form Customizer?
This is a common problem when using the PnP React Controls in a Form Customizer Extension. To address the type mismatch, you can cast the FormCustomizerContext as any.
context={this.props.context as ...
2
votes
Expected 3 arguments, but got 2
You defined your function to recieve 3 arguments :
private addListItems = (user: MicrosoftGraph.User, selectedDepartmentOptions: IDropdownOption[], destinations: IDropdownOption)
User
...
2
votes
Accepted
Is it possible to customize the HTML from a Sharepoint Modern Experience page?
It is not possible using SharePoint out of the box web parts.
However, you can do DOM manipulations using SharePoint framework (SPFx).
1. For single modern page:
If you want to customize particular ...
2
votes
Accepted
How to use a SPFx Webpart as Custom Listform on SPO?
I don't think you will be able to add SPFx web part on new/edit form of SharePoint list. However, you can reuse your form (UI/logic) in web part and create a SPFx form customizer for SharePoint list - ...
2
votes
Accepted
SPFx: pnp search how to get only files or folders
You can add additional query using QueryTemplate on top of QueryText where you can filter result based on your need.
In your case, you can filter Folder using Content Type Id as it will be always ...
2
votes
Accepted
Using .env files with SPFx components - Undefined issues
Create a file process-env.js like:
"use strict";
const fs = require("fs");
const path = require("path");
const NODE_ENV = process.env.NODE_ENV || "dev";
...
2
votes
SPFx Retrieve lists using SharePoint REST API
It's definitely not a permission issue. Something is tripping up eslint when your web part is being built.
Specifically (per the error message) it seems to be violating the no-empty-function rule.
If ...
2
votes
Optimize spfx extension loading time
Have a look at spfx-fast-serve, which can speed up your build times significantly during development.
https://github.com/s-KaiNet/spfx-fast-serve
With regards to troubleshooting loading times, you ...
2
votes
Accepted
SharePoint online (SPFx with react) - custom forms?
Yes, you are correct.
For SharePoint online modern experience lists, you can either customize the list forms using SPFx or Power Apps.
As you want to develop custom list forms using SPFx and react, ...
2
votes
Accepted
SPFx Form Customizer Deployment issue
After deploying SPFx form customizer extension to app catalog and then installing it your SharePoint site, you have to associate the custom form customizer to the content type using the specific ...
2
votes
filter a value from a list via PNP/JS and then store it in a locale variable within SPFx SharePoint Online
You are receiving array of objects as a result from your SharePoint API call. So, you will have to get the NewId from first element/object of array result.
Try using this:
public ReadCounterValue = ...
1
vote
gulp serve error
You are using Node JS version v18.12.1 which is not supported for SPFx development.
You have to use the supported Node JS version based on the SPFx version you are using.
For example:
Check this ...
1
vote
How do I pass HTML table inside mailto in anchor tag?
It is not possible to add HTML tables in email body as you are using mailto which does not support using HTML in email body.
Section 2 of RFC 2368 says that the body field is supposed to be in text/...
1
vote
Can we execute a python script within SPFX webpart
No, SPFx web parts are entirely client side. You could however create an Azure function using Python and then expose an API that your SPFx web part could call:
Azure Functions Python developer guide
1
vote
Accepted
It is fine if we store the Chat GPT api key inside the SPFx web part properties
No, secret API keys shouldn't be shared client side. If you're exposing the API key client side, then a user could share it with other people outside of your organisation. OpenAI have provided some ...
1
vote
Guest users cannot use SPFx web parts, by design?
For the avoidance of doubt I followed these steps:
https://learn.microsoft.com/en-us/answers/questions/340173/spfx-webpart-error-for-few-users-failed-to-load-co
First:
Enable external sharing for your ...
1
vote
How to build a CAML query from a string of data in JavaScript?
I created a library (SharePointPlus) that permits to deal with SharePoint API. Part of this lib, I have a function to parse a "SQL-like" string to CAML.
The function is hosted there and it's ...
1
vote
Accepted
How to build a CAML query from a string of data in JavaScript?
I have created helper functions to dynamically generate filter conditions to use in CAML query. check this:
Helper functions:
//Construct filter string required to fetch data from list using CAML
...
1
vote
Accepted
CAML Query when using Or fails giving "Cannot complete this action"
Use CAML query in this format:
<View>
<Query>
<Where>
<Or>
<Eq><FieldRef Name='onPremisesSamAccountName'></FieldRef>&...
1
vote
SPFX Form Customizer extension, how to prevent edits via REST etc
This is because restricting access via client side customisation is not a suitable form of validation. I would recommend that you use column validation settings in SharePoint to ensure that the user ...
1
vote
How to reset Office UI Fabric Dropdown
You are not telling the drop down which is its selectedKey.
<Dropdown
options={this.state.options}
placeholder= "Bitte wählen..."
onChange={ this.handleChange }
...
1
vote
Web-Part works on localhost, but it does not working on SPO
Can you check if you have initialize/setup SP context properly?
Refer below code. You can add this code in constructor in your webpart.ts file. This should solve your problem.
constructor(props: ...
1
vote
SPFx web part to modify left navigation
There is no native way supported by Microsoft for customizing left navigation using SPFx (web part or application customizer) like top/bottom placeholders in SPFx application customizer.
You have ...
1
vote
SPFX Graph, elevated privileges?
If the user does not have the required permissions, then their request to the Graph will be denied. Since the Graph API is being accessed from the current user's context, there is no way around this. ...
1
vote
Accepted
How to install SPFX (in site collection app catalog) to subsites automatically
You could try setting skipFeatureDeployment to true in your package-solution.json file.
This feature is normally used for tenant-scoped deployment and gives the administrator the option to make the ...
1
vote
How to disable a PeoplePicker Field in SPFx?
Based on the code you've provided, it looks like you're trying to change the visibility of the PeoplePicker component based on the value selected in the Dropdown component.
One issue I can see is that ...
1
vote
How to disable a PeoplePicker Field in SPFx?
I have found this:
document.getElementById("peoplepicker").style.opacity = "0";
1
vote
Accepted
Property 'get' does not exist on type 'IFields'
get() does not work in PnP version 3.
Use just brackets like this ().
Refer below code:
let spListColumns = _sp.web.lists.getById(this.properties.listId).fields.filter( "ReadOnlyField eq false ...
1
vote
SPFx: pnp.sp.search how to get only list items
Only sts_listitem would not sufficient because document is also considered as ListItem in SharePoint as we can still set metadata there.
Possible solution could use STS_ListItem_GenericList which will ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
spfx × 1981sharepoint-online × 1046
spfx-webparts × 930
spfx-extensions × 244
modern-experience × 195
react × 186
spfx-tooling × 164
sharepoint-framework × 123
typescript × 100
pnp × 97
javascript × 84
web-part × 81
pnpjs × 76
sharepoint-server × 75
sharepoint-rest-api × 71
error × 60
office-ui-fabric-react × 58
development × 49
2019 × 45
microsoft-graph × 44
pnp-js-core × 44
reactjs × 43
office-365 × 42
list × 41
gulp × 36