Overview
Currently, to change a page workflow, you would have to go through each page and change them one by one. This article provides a script that will apply a workflow across all currently existing pages in a Portal.
Prerequisites
- Access to an Administrator or SuperUser account
- Knowledge of SQL
Solution
NOTE: Make sure to take a backup of the database before attempting.
Essentially, the script will loop through all of the tabs in a particular portal using a cursor and will update the state ID to the published state name (that you will define in the script). This script will then set all the pending drafts to published. This script will publish all drafts within the specified Portal.
- You will need to update the following information for the script:
PortalID
WorkflowName
WorkflowPublishedStateName
- Execute the script in Settings > SQL Console or SQL Server Management Studio
Testing
You can test that this workflow has been applied to all pages in the portal by:
- Go to Settings > Workflows
- Edit Workflow > Click View Usage
Comments
0 comments
Please sign in to leave a comment.