Questions tagged [spfx]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

Create a webpart with typescript / sass

I created a webpart for a footer and I have to insert an image in the footer and I can't get it to display. I am using typescript and sass. It is my first webpart! <p class="${styles.subTitle}...
0 votes
1 answer
365 views

How to change web description in SPFx React webpart?

I'm writing an SPFx web part using React. I can get the description of the current web like this: let desc = this.props.context.pageContext.web.description; But how can I change the web description? ...
0 votes
2 answers
646 views

How to check logged in user has access to a another SharePoint site or not using REST Api?

I am developing a web part, where I need to check logged in user does have access to few SharePoint sites(SiteA, SiteB, SiteC) or not. I am following currently below approach. I am passing each site ...
0 votes
2 answers
895 views

how to fetch all Planner Task in SPFX through Graph API

On the basis of outlook task example give here, I am trying to fetch all task/plan in planner associated with a user. I am not sure if it is the right approach / set of code to fetching it. While ...
0 votes
2 answers
631 views

Passing variables in Query string in tsx file (react +typescript)

I am trying to pass plainid and id as a parameter in query string in URL. {planid = item.planId} { id =item.id} <td><a href="https://tasks.office.com/credentinfotech.com/en-GB/...
2 votes
1 answer
2k views

SharePoint SPFx webpart not showing latest build

I'm building a SharePoint SPFx react webpart. I'm developing on a local level using workbench with a link similar to this: https://mysite.sharepoint.com/sites/sitehere/_layouts/15/workbench.aspx#/ ...
0 votes
0 answers
44 views

Navigation to a custom webpart using ID in sharepoint online

I have created a custom app for texts heading and add options for adding id to the DOM element or the given div. Then add custom links in the page using the id of DOM eg: sites/OperationsPeople#M ...
0 votes
0 answers
311 views

PnP FieldUserRenderer control and value prop

I developed a web part where I am using FieldUserRenderer control and the field does not completely work how it should be based on documentation. In my case, when I hover the mouse pointer on the ...
0 votes
1 answer
1k views

Uncaught (in promise) TypeError: Cannot read property 'getByTitle' of undefined

While updating item in SPFx I am getting below error: Uncaught (in promise) TypeError: Cannot read property 'getByTitle' of undefined
0 votes
2 answers
575 views

SharePoint SPFX Webpart, Create a callable function that gets user information from the Graph API

My organization is currently using the https://github.com/pnp/sp-dev-fx-webparts (React-Script-Editor) webpart on several of our SharePoint online site collections to enable the functionality we had ...
0 votes
1 answer
190 views

How to create items in PnP Provisioning in SP Online site templates?

I am creating templates using the PnP provisioning but am noticing the items are not being created. I have this .json file { "$schema":"https://aka.ms/sppnp-extract-configuration-...
0 votes
1 answer
115 views

How to redirect from a TaskList to a sitepage in sharepoint Spfx

This is my Task list, how to redirect to any Site page on the click of the Task Name field? When we are clicking on any Task Name field's value, the default form is opening as shown below: Instead ...
1 vote
2 answers
1k views

Are there any good SPfx tutorials, guides and examples?

Since SharePoint 2019 doesn't come with certain features out of the box, eg. Column headers that stay in place while scrolling, I am in the process of learning SharePoint framework. Are there any good ...
1 vote
2 answers
574 views

onGetErrorMessage for PropertyFieldCollectionData CustomCollectionFieldType.dropdown not working

I'm trying to validate the inputs of my PropertyFieldCollectionData using onGetErrorMessage. It works fine for the text input (CustomCollectionFieldType.string) but for dropdown values (...
0 votes
2 answers
827 views

Expand All and Collapse All functionality on Button Click

I am using the PnP SPFx Accordion control in my SPFx solution I want make all Accordion Expanded and Collapsible on button Click. Below is my one accordion I am changing the state on button click but ...
0 votes
1 answer
2k views

SPFX File upload to List

This issue is related to a No Javascript Framework SPFx webpart with RestAPI on Sharepoint 2019. The webpart contains a 'text' and 'file upload' fields. The aim is to fill in the text field, select a ...
1 vote
2 answers
2k views

How do I find the Tenant ID of my SharePoint Online Account using SPFX

I want to get Tenant Id of my SharePoint online site using SPFX. Is there any way to get it?
0 votes
1 answer
44 views

How to manage SPFx source code [closed]

I'm developing SPFx with team members and I'm thinking about how to manage the source code. What do you use to manage your source code? What services can I use to manage the SPFx source code? I would ...
1 vote
0 answers
270 views

Problem with Redux in SPFX [closed]

I am currently practising some Redux and now trying to implement it in a simple SPFx Counter webpart but I am facing problems. Here is the Webpart which is a simple counter: When I click the '...
0 votes
1 answer
643 views

SPFX radio button click to update label value

I have SPFX no framework web part in SharePoint 2019. I am having trouble automatically calling a function when the radio/checkbox button is clicked within the form. Here is a radio button within the ...
1 vote
1 answer
376 views

Problem with creating an instance of a class in SPFX(TypeScript/React)

I am facing a problem with creating an instance of a class in SPFX. I am not sure what I should put in as a parameter. The compiler complains on whatever I put as a parameter. Here is my code: import {...
1 vote
0 answers
133 views

Add SPFx to Angular Page

My organization has a site completely designed in angularJS(Not designed by me). Now I have designed a web part using SPFx which I want to add to the existing site. The web part layout is also ...
0 votes
2 answers
419 views

How to change the HeaderLayoutType to ColorBlock in an existing modern page in SP Online?

If I have an existing page in the site pages library. How can I change the headerlayout type to colorblock? It seems I can specify that when making the page through pnp provisioning or https://docs....
1 vote
2 answers
577 views

Newly created SPFx web part using react framework gives error with SharePoint online workbench while testing

I have just created one SPFx web part with react framework. I tried testing through SharePoint online workbench (https://demo.sharepoint.com/sites/test/_layouts/15/workbench.aspx). I am getting an ...
2 votes
1 answer
352 views

Server side validation in SharePoint Framework (SharePoint Online)

I am working on a SharePoint Framework based project in SharePoint Online and using React JS as front-end library. I am also using Redux for state management and React Hooks. I want to know how can I ...
0 votes
2 answers
351 views

Exception in String type error on SPFX with JQuery

I really need help to resolve Type error encountered on this function in SPFX with jQuery. Here is the function, The return statement is failing: var addFile = function (fileTitle, fileName, fileType, ...
0 votes
3 answers
1k views

While setting up new SPFX environment getting Error of unsupportability

I am trying to set up an environment for SPFX development. I tried to install the latest version of nodejs. I installed latest version of nodejs 14.15.4 and automatically npm verion 6.14.11 installed. ...
3 votes
2 answers
9k views

Get current user's user group in SPFx WebPart

How can I get the sharepoint groups the current user is a part/ belogns to, without @pnp/sp js framework in SPFx ?
2 votes
2 answers
294 views

Not able to insert data into TaskList In sharepoint Spfx

Using SP-Pnp-Js Library, I am not able to insert data from a webpart into the sharepoint Tasklist. private SubmitWorkflowForm(): void { var TaskNameVal = document.getElementById('taskName')['value']; ...
2 votes
1 answer
426 views

Get page load time in modern SharePoint site

I need to run some JS script on each page in modern SharePoint online communication site so I created SPFx extension and added to the site. One of the things I need to do is to get page loading time (...
1 vote
1 answer
691 views

SPFX No Javascript Framework

I am encountering the below error and would welcome any information to resolve the issue: SharePoint 2019 SPFx webpart with No Javascript Framework PropertyPaneFieldType'.\n Property 'DynamicField' ...
0 votes
1 answer
689 views

Create a SharePoint List item when an Outlook/Teams/group event is created

In SharePoint Online I want to create sub-items in Document library/List and wish to reference a Teams, Group or Outlook calendar event. Is it possible to create a SharePoint List item when an event ...
0 votes
2 answers
85 views

When a document is deleted or published in a document library

I have a requirement to develop a solution based on SPFx, namely, when a document is deleted from a document library or a document is published (got main version) in a document library in SharePoint ...
3 votes
1 answer
497 views

SPFX Webpart width shrinked after published in Modern Page - SharePoint Online

Developing SPFX app, where everything looks good(I mean the width) in edit mode, soon after publish the webpart width is getting reduced somehow. Using Fabric UI CSS .propertyDigitalManagementWebpart ...
1 vote
2 answers
787 views

What is the quickest way to hide SharePoint Elements on a Modern page?

I have a SharePoint modern site homepage which I am using as a landing page. Currently I am hiding the default elements in site like "Site Title" and "Logo" using custom CSS which ...
1 vote
1 answer
50 views

Is there any default function available in SharePoint list view?

Is there any default function available in SharePoint list view like if I am sorting any of the column on sorting I want to execute some code or on SharePoint list view load I want to execute some ...
1 vote
1 answer
2k views

Fabric UI Module "Modal Dialog" in React Web Part integrated but nothing appear

I have used the standard yo creation method to create a new SharePoint Framework web part. I replaced the content of default webpart/component with the proposed script from Fabric UI -> Modal ...
4 votes
3 answers
1k views

Call Dynamics CRM API from SPFx

I want to call Dynamics CRM API from SPFx. What I've tried so far. Code: this.context.aadHttpClientFactory .getClient('{ApplicationId}') .then((client: AadHttpClient): void => { client ....
0 votes
1 answer
5k views

Retrieve data from SharePoint list via PnP JS and CAML Query

I wanted to display all files which have the property "Job" = "Job1". How to retrieve list view items using PnP JS and CAML Query? Here is the CAML Query? <ViewFields> ...
1 vote
1 answer
96 views

Unable to link CSS to the template url react content query web part

I have just installed the react Content query web part and I am linking the template url to html files in my site assets, I have a common css which has some elements common across different templates ...
4 votes
1 answer
653 views

Spfx: Change spfx Webpart environment from sharepoint online to sharepoint on prem

I have a modern web part built for sharepoint Online. I want to convert this web part to be compatible with sharepoint on-prem 2019. I have searched and found out that I would need to use spfx version ...
0 votes
1 answer
1k views

Updating managed metadata field in sharepoint online document library using SPFx

I need to update the some columns(EmpId,DocumentDate,PRType,Commnunity) in my document library.Out of which PRType & Community is managed metadata column. All works file and updated when I update ...
1 vote
1 answer
136 views

How to get users to whom a SharePoint file in a document library is shared with

I am making a accordion for a SharePoint doc lib. Accordion expands on folder/subfolder/subfolder....(up to 3 level) and also shows all files in tree like structure. I have use following api call to ...
1 vote
1 answer
3k views

Filter based on date only, not time | PnP JS

I am using PnPjs to query a SharePoint list. I am using this code: let today: string = (new Date()).toISOString(); today = `${today.substring(0, today.indexOf('T'))}T00:00:00Z` let results = await sp....
0 votes
1 answer
139 views

Teams Tab is not able to load in Teams Desktop Application using Microsoft Teams Toolkit

My app is visible in ms team application when open in browser My application is not visible in MS team desktop application Please help to resolve my error in Team Desktop application
0 votes
3 answers
2k views

how to retrieve image column from sharepoint list using sp-pnp-js in SPFX webpart

I am not able retrieve image column from SharePoint list in my solution using sp-pnp-js.
0 votes
1 answer
835 views

Error when adding DateTimePicker from PnP SPFx React controls

I'm having problem when adding DateTimePicker from the @pnp/spfx-controls-react collection. Once added in the render() method, I'm seeing <DateTimePicker name underlined and following error: '...
0 votes
1 answer
217 views

Unable to display Users from Specific SP Group in People part in SharePoint Modern Site

I have a requirement to display the User profile details from a specific SP group in modern page. I tried using People Web part available in modern site, but it does not give such option to choose the ...
0 votes
0 answers
244 views

Teams showing - Can't load the application on this page

I created a new application using SPFx in SharePoint online. I have sync the sppkg solution file to the Microsoft Teams. But when I am adding the application in the teams Tab its showing an error: ...
0 votes
1 answer
748 views

How to extract the Theme from a site in PnP provisioning for SP Online?

I am looking to extract a template with its theme from a site in SP Online. I have the code Get-PnPProvisioningTemplate -Configuration "template.json" -Out "template.xml" -Force ...

1
15 16
17
18 19
41