Post to Microsoft Team from Flow

I was preparing a demo for the Arizona SharePoint Pros group on Microsoft Teams, PowerApps, and Flow, and I thought it would be cool if I could have my PowerApp post a message to a channel conversation for teams. After a bit of digging I got it to work. It is fairly simple to setup so I figured I would write this post to make it easier for others to setup. Continue reading “Post to Microsoft Team from Flow”

Manually Registering a SharePoint Add-In

After writing the Modern Development Lifecycle article I came to the realization that the article I mentioned for creating the client id and secret missed an important step. It missed how to create the application itself. So in this article we are going to create and permission an add-in so it is ready for our use. Continue reading “Manually Registering a SharePoint Add-In”

SharePoint Framework Release Candidate 0

In big news on the SharePoint development front, the SharePoint Framework reached release candidate 0 yesterday. What does this mean? Release candidate means that what we are seeing now in the SharePoint Framework is pretty close to what it’s going to look when it reaches general availability(GA). In looking through the release notes associated with this release, https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-RC0, there are quite a few changes. Some of the changes are pretty major and will break any existing web parts that you may have created. So why would Microsoft do this? The reason is to perform some final cleanup of things that did not exist as they should in a polished project. They had to rename and move quite a few things. If Microsoft did not do this now it would probably not happen and there would be areas of conflict and confusion. You can tell the scope of how many different areas have changed by the update steps that are included in the release. Previous releases had a couple things that needed to be updated, while this release has 12 different steps of things that need to be updated. If you are doing SharePoint Framework development I highly suggest that you look through the release notes. The release notes will guide you through all the changes and Microsoft’s direction and thinking about the changes. Some of the most notable changes are:

Continue reading “SharePoint Framework Release Candidate 0”

Modern Software Development Life Cycle Part 1

I have been doing JavaScript development for many years now but it was always included as part of some other server side code that was easy to manage. When I started working on Office365 and doing 100% client side code I have struggled with the best way to manage the artifacts that are being created. With server-side code we just used Visual Studio and that would handle our connection to version control and a plethora of other tools to help us write better code. When things changed to working in Office365 I started out by adding the artifacts to a library in SharePoint and then editing them with SharePoint Designer. I know, I know, SharePoint Designer is not a good code editor but in regards to save performance, SharePoint Designer behaves better than anything else out there. The problem with this is that the code that I am creating is not stored in a centralized source repository. Also, if I wanted to get the code into the repository it was a manual effort to copy the files back to my machine and then check everything in. Dealing with multiple developers working on a project could be rather tricky since we were working on the exact same files. There have been times were changes have been temporarily lost due to a save that did not include the changes from other developers. Because of this I always make sure the library I am using has versioning turned on and sometimes I’ll require checkout depending on the likelihood of multiple devs working on the same files. Another problem with this approach is that there is no way to run any code improvement processes. If I want to use TypeScript for example, your code has to be on a local drive for the TypeScript compiler to do its thing. If you try to run it on a mapped drive through WebDav, TypeScript complains. There are also code tests, bundling, and minification that are tricky to run directly from a SharePoint library. With the introduction of the SharePoint Framework I have realized that I needed to figure out how to best handle the client-side pieces in regards to the Software Development Life cycle. This series of blog posts will cover those topics.

Continue reading “Modern Software Development Life Cycle Part 1”

Using Workflows to Perform Elevated Actions

Problem

When making the move to the cloud one of the biggest challenges for developers is how to accomplish tasks that used to be fairly simple. Recently I came across one of these instances. I had a client that we had setup in Office365 over a year ago and since that time several applications have been created. One of these applications was a time off request form. When this was setup it wasn’t brought up that they wanted to limit who could see the requests. We setup a solution where we broke the inheritance of the request after it was created. We only had an admin level account so full testing didn’t happen in this instance. We released the update and apparently it was communicated to another developer that it wasn’t working and instead of fixing the problem they just commented out the permissions section.

Continue reading “Using Workflows to Perform Elevated Actions”

Recovering from Lost Workflow Server in SharePoint 2013

Recently one of my client’s main app servers in production went belly up. We believe there was some corruption in the VM image. No matter the reason it was not a pretty situation to be in. We had to rebuild the machine. As part of this it was decided to re-install the workflow engine and the previous database associated with the engine was not used. First Problem. So the workflow engine was installed and started from scratch. And from testing everything seemed to be working fine, granted testing involved creating a new workflow in SharePoint Designer to make sure it recognized that the scope and engine was configured.

Here is where we ran into a problem. We had a custom workflow definition that we were deploying to the different site collections that were created for different groups. After the recovery was done we started receiving reports from users that the workflows would throw errors and not start. I did some digging in the ULS and found that the workflow engine would throw one of two errors. It would either throw a scope not found exception or a workflow not found exception both with a root error of a 404 coming from the workflow engine (more on this later). So I deactivated the feature that added the workflow and then let the web part that started the workflow handle the activation and setup. The workflow would still fail. Continue reading “Recovering from Lost Workflow Server in SharePoint 2013”

PowerShell Script to Transfer Search Configuration

I was working with a client a little while back and we needed an easy way to setup search on the dev and test SharePoint environments. What I came up with to resolve that issue was the following script that will take a source and destination URL and it will transfer the search settings from the one environment to the other. I am publishing this with the consent of and at the request of this client because he thought it was cool enough to share. I have not used this in a while but I do remember that there were some interesting error messages that came up when trying to migrate the schema because of duplicate properties but there is an option to exclude that if you are getting those errors. Enjoy.

I tried embedding the scriptlet itself but some of the xml was getting lost so here is a zip of the ps1 file.

TransferSearchConfiguration-SPKnight

SharePoint Fest Seattle 2015

I have been invited to present the following sessions at SharePoint Fest Seattle 2015 August 18-20, 2015. I look forward to meeting with everyone and sharing this information.

SharePoint Fest Seattle 2015 Session Abstracts

DEV 203 – SharePoint 2013 and AngularJS Lessons Learned from the Trenches

Thanks to SharePoint 2013 it is a lot easier to be able to create client based solutions. AngularJS is one of the solutions out there that allows developers to create applications very quickly through an MVC implementation.

In this session we will go over the basics of AngularJS in regards to apps, controllers, services, and views. We will create a simple application built entirely through client technologies and in SharePoint. The principles learned here can be used anywhere in SharePoint whether it is a Farm Solution in an on-premise environment or in an app on Office 365.

Come learn a lot of the pitfalls to avoid and some best practices that will help you love AngularJS as another tool in a developers tool belt.

SIA 105 – PowerShell to the Rescue, For Developers and Admins

As a developer PowerShell was one of those tools that had to be used to deploy things to SharePoint, but it is so much more. PowerShell allows the easy creation of simple or complex scripts to accomplish so many things. PowerShell can even be used to manage your SharePoint environment remotely.

In this session we will cover the basics of PowerShell and then we will dive into some concepts that will be beneficial for anyone that works with the SharePoint backend. We will cover how to use PowerShell to automate both on premise and Office 365 SharePoint environments.

Announcing Release of AngularSP to Beta

I am announcing the initial release of my first open source project, AngularSP. I have been working more and more with AngularJS and I love it. AngularJS has saved me so much development time. The problem I saw was that every project I worked on, I had to embed/re-create the connections with the SharePoint REST services. I kept thinking, I really should just do a service similar to $http to encapsulate the functionality. So here is the initial release of the factory. Currently the library handles all of the CRUD operations on SharePoint lists hosted within the same domain as the calling page(no cross site calls as of right now, that will come later). The library will work with On-Premise SharePoint as well as SharePoint Online in Office 365. The plan is to add more functionality as time goes on.

The current priorities are listed on the CodeProject site but I am including them here as well for now.

  1. Automatic handling of Request Digest Token for REST Implemented
  2. Search Calls
  3. All implemented methods for the request executor.

Let me know if there are any features that you would like to see added.

AngularSP on CodePlex