New answers tagged

0

Got the form done and people picker integrated using sppeoplepicker js. Sharing my learnings and how i got it done in my blog: Custom Form Using SPFX (No Javascript Framework)


0

You are trying to get user details through local machine. The API you are using is a SharePoint REST API and for that you will need a SharePoint site and access to the site to get the current user details by using the following URL: https://Your_SharePoint_Site_Url/_api/web/currentuser


0

If you are storing it as an array of string then try using below code: export interface IItemsData { k: string[]; }


0

Debug your code - set a breakpoint on return response; then check the result inside of response object. Add another then to your promise i.e. .then((items) => { console.log(items);}) then do whatever you want with the data in your response.


3

This question was posted 2 years ago. I'm asking myself the same thing now, but it still appears that Visual Studio Code is the way most people go here. Visual Studio 2019 includes the ability to do Node.js projects, but doesn't mention SharePoint Framework. I'd guess that the method could be worked out, but personally I'm going to go with the approach ...


1

You can use HttpClient REST call in your SPFx web part to POST the properties to unique URL/Path to your flow. You can find the detailed article on how to run a Microsoft Flow from a SharePoint Framework (SPFx) web part in below link: How To: Run a Microsoft Flow from a SharePoint Framework (SPFx) web part. Also, below is the similar example (Not in SPFx) ...


0

We recommend that you use the versions of the Office UI Fabric React package included in the project in the SharePoint Framework's Yeoman generator. For instance, the SharePoint Framework v1.7.0 release uses Fabric React v5.131.0 Note: Fabric React versions 2.x or older are not supported in SharePoint Framework. Source: Office UI Fabric React. Also, ...


0

SPFx extension(application customize) for now only has 2 place holder top and bottom. If you want to add html to any other place you would have to use custom javascript only. The way you did it using content editor webpart might not work because, webpart would be only available on single page. I would suggest you to do following Create a custom javascript ...


0

Hi here you go this should work, after you run bellow command: Step-1: npm install @microsoft/generator-sharepoint --save-dev you should run the following command: Step-2: yo @microsoft/sharepoint Step-3: gulp trust-dev-cert Make sure you allow access when popups come step-5: gulp serve


0

In Fabric core, you will not get the Fabric controls. For that you have to use Fabric React


0

The helpful folks in the comments never left an answer so here we go. Taken directly from @Jordan's comment: @russellg doing it inline I think is the way to go, but don't mutate the state without calling this.setState. onChanged={ e => {this.setState({key: value});} }


1

Have you added C:\Program Files\nodejs to your PATH environment variable ? Follow the steps below :- Search for the Environment Variables Once you locate them Click on Edit Environment Variables. Click "Environment Variables" . In the "System Variables" option, search for "Path" and edit it by including C:\Program Files\nodejs. Make sure it is ...


1

Unfortunately, you cannot update a list view with the help of user API without refreshing the whole page. But it is possible to extract corresponding method from a built-in require module with the below code: var listEl = document.querySelector('.sp-App-root'); var listVM = __ko.dataFor(listEl); var ii = listVM.resources.consume(require.s.contexts._.defined....


0

Find below references for learning Development using SharePoint Framework: Overview of the SharePoint Framework - Official documentation by Microsoft. SharePoint Developer Community - PnP - YouTube Channel SharePoint Framework Release Notes - GitHub SharePoint Framework WebPart Samples - GitHub SharePoint Framework Extension Samples - GitHub Visual Studio ...


0

For SharePoint Framework, you can first check the official doc here. It will always be a good starting point. And you can check samples and tutorial here


0

Use this: var ID = getParameterByName("ID", window.location.href); function getParameterByName(name, url) { if (!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); if (!results) return null; if (!results[...


0

Try below. const options: ISPHttpClientOptions = { headers: {'odata-version':'3.0'}, body: `{'query': { '__metadata': {'type': 'SP.CamlQuery'}, 'ViewXml': '<View><Query><OrderBy><FieldRef Name="ID"" /></OrderBy></Query></View>' }}` }; return this.context.spHttpClient.post(...


0

What worked for me is creating the folder then updating it with the right FileLeafRef like so: let newFolder = { ContentTypeId: '0x0120', Title: folderName }; shpList.items.add( newFolder ) .then((value) => { shpList.items.getById( value.data.Id ) .update({FileLeafRef: folderName}) ...


2

You can use dangerouslySetInnerHTML attribute to add the HTML. Modify your code as below: return <div> <Label><div dangerouslySetInnerHTML={props.appendTextDetails} /></Label> </div> React DOM elements


0

@kanishka - Did you manage to find the solution - I have a similar requirement where custom footer only needs to be visible when user scrolls down bottom of the page. We tried to set the placeholder position absolute but there are multiple scrollbars appearing. Any help highly appreciated !!


0

if it helps someone else I had the same problem and to solve it had to initiate the pnp.setup public onInit(): Promise<void> { return super.onInit().then(_ => { pnp.setup({ spfxContext: this.context }); }); }


0

As other mentioned SharePoint framework works for SharePoint 2016 Feature Pack 2 and SharePoint 2019). But one thing to note here is that SPFX 1.4.1 is only supported for On premises. it means you can only create client side webparts using SPFx for on premises. You won't be able to create extension or library components which are available in latest ...


1

The SharePoint Framework works for SharePoint Online and also for on-premises (SharePoint 2016 Feature Pack 2 and SharePoint 2019). Reference: Overview of the SharePoint Framework


0

Yes Citing from this page The SharePoint Framework works for SharePoint Online and also for on-premises (SharePoint 2016 Feature Pack 2 and SharePoint 2019).


1

You can only add only few custom actions configuration with modern experience EditControlBlock - Yes, these entries show up as custom menu items. CommandUI.Ribbon - Yes, these entries show up as toolbar items. Everthing else - Not supported. But as alternative, If you are looking for something link below. refer to sample provided in pnp sample <pnp:...


0

Often, it’s due to location ref issues (path to the modules when installed globally), so when you run gulp it does not know where to look (can be caused by system update, nvm bugs (if you use it), etc. You can try this approach: https://stackoverflow.com/questions/24027551/gulp-command-not-found-error-after-installing-gulp/41419949 Witch propose many ...


Top 50 recent answers are included