Wednesday 12 September 2018

Error Handling for Office 365 SharePoint Actions on Microsoft Flow

In this post, let us look how we are going to handle the Office 365 SharePoint action errors that occurs on Microsoft Flow platform.

Problem Statement: There is an option to get the user profile property on Microsoft Flow using SharePoint REST API. We need to handle if there is any error to this action. Let us see how to handle/catch the error and send a mail with error details.

Sometime back I have published an article for updating user display names for items created on SharePoint using Microsoft Flow. We will use the same concept here, but only we will see how to catch and send the error details over mail.

The flow to get and update the user profile property is as follows.
  • Create a trigger to fire the flow whenever an item is created.
  • Create a SharePoint action “Send an HTTP request to SharePoint”, to get the user profile property details as explained in the article mentioned above.
  • Parse JSON data to get the exact required property (user display name).
  • Update the same item with author name field with the value retrieved.


Handling Error:


The following steps shows how to configure the flow to handle the error and configuring appropriate send email action.
  • Just after the “Send an HTTP request to SharePoint” action, add a parallel branch with an action. 

Friday 7 September 2018

SharePoint Saturday Bangalore Event - Automating SharePoint Processes with Microsoft Flow

SharePoint Saturday Bangalore 2018 is a free and open SharePoint community event to exchange the knowledge and build fellowship.

Developer Track Session at a SharePoint Saturday Bangalore 2018 Event - Automating SharePoint Processes with Microsoft Flow! It was an extended interactive session where the benefits of using MS Flow for SharePoint explained with live demos.

I spoke on Automating SharePoint Processes with Microsoft Flow in a short session. The session was a developer track session, which had lot of tips, and demos. The agenda included,
  • Introduction to Flow
  • Templates and Connectors Available
  • How to create custom connectors
  • How to create and integrate flows with SharePoint or other systems
  • Data Loss Prevention Policies
  • Benefits & Conclusion

Microsoft Flow is a cloud based tool that helps building automated workflows between multiple systems. In the session, I will be explaining the basic understanding on MS FLOW. Further, I will focus more creating the custom connectors, and let us also look at creating flows with the help of custom connectors.

https://www.slideshare.net/NakkeeranNatarajan/automating-sharepoint-processes-with-microsoft-flow-spsbangalore

Monday 27 August 2018

Provisioning Layout and Static Content for Office 365 SharePoint Wiki Pages Using PnP PowerShell

Here let us look how to add text to the wiki pages using text layouts with predefined text. In the samples, let us use PnP PowerShell scripts to create a wiki page, apply default layout and for adding content.

Problem Statement: Programmatically creating or updating wiki pages which uses OOB wiki page layouts with some predefined text. This is easily possible with manual actions. While creating a page using client side scripts, adding content to the page is not feasible. So, let us look how to add the text to the created wiki pages programmatically using PnP PowerShell scripts.


Applying Wiki Page Layouts with Content


The following are the points to be considered for adding text to wiki pages.
  • Create a Wiki Page (This is required if the page doesn’t exist already)
  • Retrieve the wiki page to be updated – Using CAML query to get the required page list item.
  • Apply text layout with predefined text to a retrieved wiki page.
Before getting into operations, let us connect to the SharePoint site using PnP PowerShell using the following snippet.

Create a wiki page: Let us programmatically add a page to a SharePoint site using PnP PowerShell script. The following snippet creates a page with the required layout.
Note: Skip the above step if wiki page is already created.

Tuesday 14 August 2018

Creating Page Layouts with Rich HTML Field Editors on Office 365 SharePoint

You would have seen several articles for creating page layouts with custom content types. But in this article let us look how to provision page layouts with multiple rich text fields.

Problem Statement: OOB publishing HTML field (Rich Field Text Column) can be used to create the content type for page layouts manually. But if you require more than one Rich Field Text Column, then we need to create those publishing HTML field programmatically.


Create Page Layout with Rich HTML Fields:


The following are the points to be considered while creating page layouts.
  • Create Site Columns
  • Create Site Content type
  • Add Site Columns to the Content type
  • Create Page Layout using the Content type.
Since few properties needs to enabled on a field, this is only possible with programming way. The field XML is built and then the field is created using the field XML.

This approach might be possible in multiple programming ways including PowerShell, CSOM PowerShell, CSOM, JSOM or REST API. But in the samples below, let us use PnP PowerShell for provisioning required components.

Wednesday 1 August 2018

Customize People Picker Columns on Office 365 SharePoint Lists using OOB Column Formatting

Microsoft enables developers to format the SharePoint columns using JSON on the OOB list views. It is achieved using column formatting feature, which is available on the Office 365 SharePoint modern sites so far. The way the fields are displayed can be changed with the help of column formatting.

Column formatting helps in rendering the fields with customized view and style. There is no complex customization or coding involved in applying the column formatting.

In this scenario, let us look customizing the SharePoint user field column, available on a list. By default, user names will be displayed with hyperlinks on the SharePoint list views. The hyperlinks will lead to the user profiles. For example, we will hide the default user hyperlink text and show the picture of user along with user name using column formatting.

This customization is only possible with modern views of SharePoint list. Current view of the list will be,
SharePoint Modern List View
SharePoint Modern List View