Posts

Showing posts from 2017

PnP- Example using XMLSharePointTemplateProvider , CSOM

I was working on PnP site provisioning, and looking for an example for using the PnP  XMLSharePointTemplateProvider class. No documentation or example I found in detail.  Problem was:  In all the examples/samples code written or get on git is follow the sequence of getting the web template and apply it to new. Function used are  GetProvisioningTemplate  and followed by  ApplyProvisioningTemplate . I was having scenario like, I extracted the XML template once, stored at central location on my SharePoint Online tenant in document library. Wanted to reuse the same template for the every time when user runs the site provisioning. (Technically skip calling the   GetProvisioningTemplate  step) After digging into the PnP.core framework code, found some test cases related to  XMLSharePointTemplateProvider  that   gave some detail about how and what parameters need to pass to achieve this scenario. Solution : private static ProvisioningTemplate GetSharePointTemplate()

SharePoint 2013/ Office 365: SharePoint designer workflow fails to assign task to SharePoint group.

I faced the weird issue, that SharePoint designer workflow which we have created to assign task to all the members of the SharePoint group. Which was working fine for some group and suddenly started failing for the newly created SharePoint group. I spend some time on research , debugged the workflow no luck there, then at last thought to compare the group settings as it works for few. That did a trick and come to know that relation of Group Visibility settings in SharePoint workflow. If the Group Visibility is set to "Group Members" - Workflow will fail for this group, it will not assign the tasks or other group related operations will fail. Workflow requires to have Group Visibility set to "Everyone". else it will fail. I came to know two scenarios where it fails if visibility is not "Everyone" 1. When we assign task to SharePoint Group. 2. When we try to check from workflow that user belongs to particular SharePoint group or not. I hope th

SharePoint Online / Office 365 : Steps for Adding Search Result Webpart in Pagelayout

Image
Recently, while working on a SharePoint online project I faced the requirement to add the Configured Search result webpart in PageLayout. Which should show the result based on the one of other taxonomy field on the page. Steps to include the Search Result Webpart in Pagelayout: 1.Create one page and configure the Search Result Webpart there. (Tip: Create the separate result source, so no dependency on changing the query later in pagelayout if any modification.) 2. Export the webpart, open the exported file in any editor. Which will look something like below image. We will require all these property value to configure the webpart in layout. 3.  Create the page layout and set up the basic design. 4.  Register the following assembly at the top of your Pagelayout. < %@ Register Tagprefix = "SearchWebControls" Namespace = "Microsoft.Office.Server.Search.WebControls" Assembly = "Microsoft.Office.Server.Search, Version=16.0.0.0, Culture=neutral,

Step by Step SharePoint Framework setup with Angular2

Image
I started trying the  new SharePoint Framework (SPFx), which looks quite promising. let’s start to setting up a SPFx project that uses Angular 2. Prerequisites  to configure/setup the development machine :  link Step 1: In cmd, Navigate to the directory where we want to create our project. Step 2: Run the command " yo @microsoft/sharepoint" Step 3: Now we need to follow the instruction given in  SharePoint Client-side Solution Generator   Step 4: Here at this stage we need to select the JS framework. there is possibility to select the out of the box framework supported. however to use the Angular 2 as our JS Framework we need to select the "No javaScript web framework" Step 5: Now installation and configuration will start, it will take sometime to complete. Once that done, will get the success message. Step 6: Now to start the local web server, run this command: gulp serve Step 7: At this point it brows