0 comment

Smart stupid web parts with SharePoint Framework – Part 1

When you write a new web part with the SharePoint Framework you might create a genius web part, where all the business logic is compiled into your web part. This approach makes sense when the web part is an isolated piece of work.

Image with text saying Smart stupid web parts with SharePoint Framework

Sometimes you like to write pretty simple web parts that only access a backend or third-party API from somewhere on the Interweb. In this case, you can write all the data access inside your web part. Give the user the option to store APP Key, APP Secret and particular access token directly in the web part. Might pre-populate some of those properties of with your company-wide secrets and API keys too.

[Read more]


First new SharePoint Framework web parts arrived on Office 365

While I was looking at the new SharePoint site content page I asked myself if more can be found that gives an indication of the upcoming framework and future improvements.
First, I took a look at the source code. Not a big surprise the page was built again using Facebooks ‘React‘ for the user interface and ‘Knockout‘ was used for data binding.
After that I came up with the idea to take a closer look at the web part gallery to see if might some web parts have been deployed to. To my big surprise I found overall five new web parts.

Web Parts of the new SharePoint Framework Extension

Web Parts of the new SharePoint Framework Extension

While some web parts are used to provide tips and trick or how to get started. Two other web parts are more interesting.
The ‘Embed Video Web Part’ and the ‘Embed picture library web part’. I populated them to the gallery and added them to a page in SharePoint. Currently they are deployed, but sadly not working yet. There are no web part specific properties to be configure now and I guess they current won’t load any additional Script or CSS.

New webparts embedded on page

New webparts embedded on page

Embed video web part makes sense to me because this is currently handled by a script embedding web part. A web part that is not responsive without customization.
The embed picture library web part is more interesting because the description states that you can use this to create a fancy new slide show.
In addition to those upcoming web parts it is likely that the new namespace of the additional framework will be ‘Microsoft.SharePoint.SPX‘.


It is great to see at least a glimpse of the upcoming changes and how the new user interface will be built. Waiting until autumn is still such a long way to go. Especially if you use the same mechanism to customize SharePoint for at least two years now.
Let’s hope it will be released sooner than later. I guess many people love to get their hands on it and provide feedback. Even if it is not rock solid yet.
If you are not so familiar with things like Yeoman, Angular, ReactJS, Handlebars or Knockout, please check out some really great web casts done by the Office PNP team.

0 comment

Get creation and modification Information from Views in Lists and Libraries using PowerShell

The “Modified”, “Modified By”, “Created by”, “Created” cannot be accessed directly via the SPView object because this simply doesn’t store that kind of information. To request this information the SPFile object needs to be used instead.

To get this information the following power shell script can be used:
# define variables for script
$SiteUrl = "http://yourserver/sites/yoursite"
$viewurl = "http://yourserver/sites/yoursite/Lists/customlist/AllItems.aspx"

$targetUrl = Get-SPWeb -Identity $SiteUrl
if ($targetUrl -ne $null)
    $targetFile = $targetUrl.GetFile($viewurl)

        Write-Host "Created By: " $targetFile.Author
        Write-Host "Modified: " $targetFile.TimeLastModified
        Write-Host "Modified By: " $targetFile.ModifiedBy
        Write-Host "Created: " $targetFile.TimeCreated
        Write-Host "File doesn't exist"

Make custom list forms centralized manageable

SharePoint Designer is a great tool for prototyping but it can really mess up your installation. I want to show a new way / old way how customized form could be make centralised manageable.

For example if you want to create a list form that has certain columns visible to users with a special permission. The fastest way to get there is to create a custom list form is in SharePoint Designer. A tutorial for this can be found at Microsoft Create a custom list form using SharePoint Designer – SharePoint ….

Customising form works great as long as you have a single list and a single form in your portal. If someone saved the list as template and created new instance, the problem start to begin when something needs to be changed in the form.[Read more]


Exporting XSLT List View Web Part using SharePoint Designer

Imaging the following situation where you want to export an XSLT List View web part and embed it on a different site. So the good thing about this it’s easy to accomplish. I came across a great article posted by Glyn on his blog how to export an xslt viewer web part. He shows in his article some really great insight how the xslt viewer web part can be exported. The only thing he left out is that you can export XSLT List View web parts using SharePoint Designer. This feature is really well hidden in the ribbon.

In SharePoint Designer simply select the XSLT List View web part you want to export. In the Ribbon you will find a specific menu for this web part. Ribbon for the web part comes up you can select inside the “Web Part” Tab. In the far right area of the ribbon you will find two really helpful menus.

Well hidden export feature on the right side

The “To Site Gallery” option will copy the web part to your site collection web part gallery. You will also be asked how you want to name your web part, description and you will be able to change properties.

XSLT List Viewer Export Options

Another option to select is if you want to use it relative to any site where the web part will be embedded or get data only from the current site.

Web specific settings for export

The “To File” option will open the download dialog to store the web part and the configuration to a file.

As you see it’s easy to export a XSLT list view web part and use it the way you like. You can also cross embed lists from one web into another.