12/24/2017

Including Assets in SharePoint Framework Solution Packages

SharePoint Framework v1.4 contains new feature - ability to include all the used assets inside solution package to simplify the overall process of the solution hosting and delivery.
The assets are all JavaScript files, CSS files, images, fonts, etc. that are referenced in the project.
Let's deep dive a bit in the topic to understand the process.

10/23/2017

Declarative Column Formatting in SharePoint Online


One of the announcements during Microsoft Ignite was ability to apply column formatting (conditional formatting, actions links) using JSON definitions, without JavaScript code and Field Customizers.
Now it's rolling out and I want to combine some thoughts and known information on this type of customization.

10/19/2017

SharePoint Framework Extensions: Command Set

In this post I want to show you step-by-step implementation of SharePoint Framework Command Set Customizer.
Key features of the sample:
  • SPFx Command Set Customizer implementation
  • Current user permissions check
  • construction of url to work on specific item's permissions
For those who doesn't want to read the post you can get it from here.

10/03/2017

Microsoft Ignite 2017 Recap - Subjective View

In this post I want to recap announcements that were done during Microsoft Ignite 2017.
It is not a full list but more an excerpt of features that are important to myself and our company. I will use logical structure on announcements provided by Microsoft. It's based on processes in the organization, not this or that product or technology.
I will also add some tags to announcements that may help to select the most valuable ones for yourself.

8/31/2017

Programmatically Change Modern Page Banner Image

In this post I want to describe how to programmatically change Modern Page Banner Image
The code below is written on JavaScript using JSOM (JavaScript Client Object Model) but it can be easily converted to C# (CSOM) and PowerShell as well.

8/23/2017

Handling Multiple Editions of SPFx Solution

In this post I want to explain an approach of how to handle (generate builds, update customers) multiple editions of the same SharePoint Framework solutions.
Use case for the approach:
You are an ISV and developing some product that has multiple editions, let's say, trial, lite, full. You want to have separate package file (sppkg) for each edition and also reference different CDNs based on the edition.
The approach I'll describe is not the only possible but it was successfully used for our own products.

8/21/2017

SharePoint Framework Extensions: Application Customizer

In this post I want to show you step-by-step implementation of SharePoint Framework Application Customizer.
UPDATE: on 9/25/2017 SPFx Extensions were GA-ed. The post is updated to contain the latest version of API.
UPDATE: on 8/29/2017 Release Candidate was announced. The post is updated to contain newer version of API.
Use Case for the sample:
Your team is working on some project and you're using SharePoint Tasks list to assign and monitor tasks in the project. You want to notify a member of your team that he or she has overdue tasks. You want this notification to be available on any page on your site and also to provide link to the Tasks list view filtered by current member and by due date.
The result may look like that:

Key features of the sample:
For those who doesn't want to read the post you can get it from here.

7/31/2017

Fixing "404 Page not found" on New/Edit/Display Forms and List Views After Custom Web Template Site Migration (2010 -> 2013)

SharePoint migration is always a challenge. And the more customizations you have the more challenging it is.
In this post I want to describe the solution to fix "404 Page not found" issue that may occur after migrating sites based on custom web templates and custom features.

7/04/2017

SharePoint Framework Extensions: React Slider Field Customizer

In this post I want to show you step-by-step implementation of SharePoint Framework Field Customizer - React Slider Customizer.
UPDATE: on 9/25/2017 SPFx Extensions were GA-ed. The post is updated to contain the latest version of API.
Key features of the sample: For those who doesn't want to read the post but need the code - you can get it from here.

6/09/2017

SharePoint Framework Extensions Developer Preview Is Here!

On 6/6/2017 Microsoft finally announced availability of SharePoint Framework Extensions Developer Preview - a set of allowed customizations to change user experience of sites, lists and document libraries. Drawing a parallel between "classic" SharePoint development and new features - this is a new iteration of JSLink, ScriptLink and custom actions.
Let's review currently available extensions and their usage.
UPDATE: on 8/29/2017 Release Candidate was announced. The post is updated to contain newer version of API.

4/28/2017

Using SharePoint Themes colors in SPFx Client Side Web Parts

Often you can have a task where your custom web part style (colors, backgrounds) should change to fit current selected SharePoint Theme (Site Settings -> Change the look).
I have good news for you - it's really simple to implement in SPFx Client Side Web Part

2/25/2017

Getting List's Incoming Email Settings From JavaScript

This task may be pretty unique but on one of the project I needed to get Incoming Email settings for all document libraries using JavaScript only.
After brief investigation I found that there are no any related properties in CSOM's/JSOM's List object.
But you can alway get list's Schema XML and get practically any information from there. Needed property is stored as attribute and has name EmailAlias.
So, the solution was pretty simple:
// getting context
var ctx = SP.ClientContext.get_current();
// getting web
var web = ctx.get_web();
// getting list
var list = web.get_lists().getByTitle('Some Title');
// loading SchemaXml
ctx.load(list, 'SchemaXml');
ctx.executeQueryAsync(function() {
  // needed property is stored as an attribute with name EmailAlias
  // if the property is not empty then Incoming Email is configured for the list
  var content = (new window.DOMParser()).parseFromString(list.get_schemaXml(), 'text/xml');
  var emailAlias = content.getElementsByTagName('List')[0].getAttribute('EmailAlias');
});

Using this approach you can also get other properties as well. Some of them are also included in JSOM's object as properties but some may not.

Have fun!