Skip to main content

SharePoint Framework with the extension



I tried to create SharePoint Framework with the extension provided by SharePoint PnP. It is very easy to create a SharePoint Framework Web Part in Visual Studio.
Developer need to first fulfill the Pr-requisites
After installation of these pre-requisites , You will be ready to create new Web Part with SharePoint Framework. Here is simple steps to create a small web part:
Open Visual Studio 2015 / 2017 & Create new project. Here you need to go to the SharePoint templates category and then select SPFx Web Part Project.



You must provide solution name & Project Name. This solution name will be shown in next dialog box. Now hit OK.
Now one new form will be popup. Here you have to select Framework, Put Component Name, Component Description and at last a check box .


Here we have option “none, react, knockout “. You can choose any of these .By default Framework will be none & you can use any JavaScript framework later on.
At last you have to just hit “Generate” button. It will take a while to create new project with the Web Part with SharePoint Framework. After creating the project, it will also show you the log file.



Now how to run this project without making any changes . Juts press F5 key to run this project.
F5 command will launch the demo in command prompt with “Gulp Serve” command. You can also modify this command. If you want to change this command , Right click on your project & then go to “Properties”. In the Properties pane, go to Debug, Here you can modify command parameter for gulp.



Now lets run this project in local workbench first. Just hit F5. Gulp task will start & run the workbench.



Here is our web part. Now you just need to click on this web part to add in this page. It will look like :


It is very easy.
Url for local workbench : https://localhost:4321/temp/workbench.html
Url for SharePoint Online workbench : https://<<SiteUrl>>/_layouts/15/workbench.aspx




Post a Comment

Popular posts from this blog

SharePoint Interview Questions and Answers

SharePoint Interview Questions and Answers

Get More Questions and Answers

QWhat is SharePoint?AnsSharePoint is a browser based document collaboration platform given by Microsoft.

QWhat are features of SharePoint 2010?AnsSome features are :
·Document Collaboration ·Enterprise Search FAST Search ·New Enhance Web Part ·Ready made Silver Light web part ·Business Connectivity Services ·Social Media Investments ·Large lists ·Enhanced collaboration features ·Visio Services ·Usage reporting and logging ·Better Network Differencing & SharePoint Offline in SharePoint Workspace ·High Availability/ Disaster Recovery Innovation ·Admin Insights through the Logging & Usage database, and dev dashboard ·Service Applications ·

How to get current logged user information using JavaScript ?

This is post which is simple and not really needed. But when I started writing the code in ECMAScript I have faced problems in getting the logged in user information. So, my readers may feel good after see this post and really most the users are looking for this too.
By this time, we have really understood all about ECMAScript Client Object Model and debugging. So, it's easy for us to know it well.
Please find the code below to get the current user information.


<asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server">

Now copy & paste this JavaScript code after above mentioned tag :
<script type="text/ecmascript">

        ExecuteOrDelayUntilScriptLoaded(getUserData, "sp.js"); 


    // To Get Current User Name
    var context = null; 
    var web = null; 
    var currentUser = null; 
    var currentUserId=''
    function getUserData() {

            context = new SP.ClientContext.get_current(…