How to add custom banner to alert “SharePoint 2010 workflow retirement” to site users and owners?

Summary

The SharePoint 2010 workflow will retire. Microsoft announced it, see the following link.

SharePoint 2010 workflow retirement

For my customer, even after multiple messages to the Admins and Owners there was not an immediate action taken by the owners. To alert ‘SharePoint 2010 workflow retirement’ to all the identified sites my customer wants to add a banner similar to the following.

Banner for site with SharePoint 2010 Workflow

Solution

Prerequisite

  1. You should have the PnP PowerShell installed.
  2. You should have the SPFx development environment to create the .sppkg SPFx package.
  3. You should have configure and consented for PnP PowerShell on your tenant. Please follow this article.

Step # 1 : Create and install the SPFX application customizer for the modern site or page

Please click here to go to the GitHub Repo for the SPFx Application Customizer Extension.

Step # 2 : Add the JavaScript Link for the classic page or site

The JSLink file will allow to get the messages on the classic site or page.

https://github.com/pankajsurti/sp2010-alert-banner-app-extention/blob/master/DeploymentScript/AddSP2010BannerMessage.js

Create a folder c:\SP2010RetirementBanner copy the above JSLink file.

Step # 3 : Using the PnP PowerShell script add the banner for the list of sites in CSV file.

Copy the Process-AddRemoveBanner.ps1 in c:\SP2010RetirementBanner.

Create site2process.csv file in c:\SP2010RetirementBanner folder with the header as Url. Add your tenant’s site URL per line.

From c:\ SP2010RetirementBanner, run the following PowerShell command using

https://github.com/pankajsurti/sp2010-alert-banner-app-extention/blob/master/DeploymentScript/Process-AddRemoveBanner.ps1

# make sure the PS1 and js files are in the same directory i.e. c:\SP2010RetirementBanner

.\Process-AddRemoveBanner -ActionType "Add"

Step # 4 : If SP2010 workflow are removed, using the PnP PowerShell script Remove the banner for the list of sites in CSV file.

Run the following PowerShell command using

https://github.com/pankajsurti/sp2010-alert-banner-app-extention/blob/master/DeploymentScript/Process-AddRemoveBanner.ps1

# make sure the PS1 and js files are in the same directory i.e. c:\SP2010RetirementBanner

.\Process-AddRemoveBanner -ActionType "Remove"

Conclusion

This approach is only an awareness to the end users to think about the issue of the SP2010 workflow will retire soon so they can migrate to modern workflow using Power Automate.

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in SharePoint, SharePoint 2010, SharePoint 2013, PnP.PowerShell. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s