SharePoint geek, dev, admin – Chicago IL
SharePoint geek, dev, admin – Chicago IL

Blog

Replace CE / SE Web Part Content PS1

Managing front end code (HTML/JS) embedded within Script and Content Editor Web Parts can be a hassle.   With multiple instances scattered across ASPX pages, web part galleries, and many sites quickly becomes untenable.

The below PowerShell script gives SharePoint admins a new way to search/replace the internal text of CEWP/SEWP web parts within a target site collection.    Updating a URL reference or DNS name can now be done across potentially hundreds  of WP in just a few minutes.

For example, a team site having 1 CEWP and 1 SEWP with the world “hello” can be quickly replaced with “hola” by running this script.

Cheers! 

shades_smile

 

Source Code

 

Screenshot – Before

1

 

3

 

Screenshot – After

5
6
7

 

8

Simple URL Shortener

Recently I wanted to create a URL shortening service for SharePoint 2013.  Yes, SharePoint 2016 ships with “Durable Links” but many places run older version.   Yes, there are commercial software packages available for sale but management and budget approval can be challenging.

Why not create a simple redirect ASPX with a Custom List of URLs?

Check out the brief video below to see it running live.   The Install PS1 script will create the needed List and upload front end files (ASPX + JS).

 

Source Code

 

Video

 

Diagram

2017-01-10_14-30-07

VIDEO – Cloud migration of JS todo CRUD to Azure & Office 365 (part 2 of 2)

Live walk through of hosting “Todo List” CRUD application on the Microsoft cloud.   Continued from the first video where we coded a full local application, this video migrates the application front/back end to the cloud.   HTTPS Breeze WebAPI endpoint hosted on Azure for the backend with HTTPS Office 365 SharePoint Content Editor Web Part for the frontend GUI end user experience.

Custom HTTP header was added for extra security as an application “client secret” which is required for the WebAPI middle tier to respond to HTTP traffic.  Missing HTTP header will respond with “null” and not execute any Dot Net code.

Enjoy!

shades_smile

 

 

Diagram

breezejs-sharepoint-architecture

 

Video

 

References

VIDEO – code JS todo CRUD on Breeze & SQL Express (part 1 of 2)

Live coding walk through of a locally hosted “Todo List” CRUD application with Breeze WebAPI 2.2 middle tier and SQL Express relational database storage.  This baseline allows developers to be more productive locally with fast feedback loops.   Iterate code changes, reload test, and repeat.   This technology stack can create sophist acted business application with input validation, advanced data schema, workflows, and more bringing in the latest web innovations from NPM and NodeJS.  

Custom HTTP header was added for extra security as an application “client secret” which is required for the WebAPI middle tier to respond to HTTP traffic.  Missing HTTP header will respond with “null” and not execute any Dot Net code.

In this video I used several components and want to share links for each:

 

 

In a future video, I’ll show how this application can then be deployed to Office 365 and SQL Azure to leverage Microsoft’s cloud hosting.

Enjoy! 

shades_smile

 

 

Diagram

 

Video

Live code JS todo CRUD on Breeze & SQL Express from Jeff Jones on Vimeo.

 

References

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲