Showing posts with label SharePoint Designer. Show all posts
Showing posts with label SharePoint Designer. Show all posts

Monday, December 5, 2016

Find custom action or activity in a designer created 2010 workflow

While cleaning up my SharePoint farm for the cloud migration, i ran into an interesting problem.   If there are custom activity or action created for your designer workflow, how do you track down which ones uses those custom action or activity.

Here is a simple code to go through a site collection that returns all 2010 workflows that is using your custom action/activity that you created with code.

Add-PSSnapin *sharepoint* -ErrorAction SilentlyContinue

$encode = New-Object System.Text.ASCIIEncoding

$site = get-spsite "type in url"

foreach($w in $site.allwebs)
{
    foreach($wf in $w.Lists["workflows"].items)
    {
        if($wf.Name -like "*.xoml")
        {
            $file   = $wf.File
            $data   = $file.OpenBinary()
          
            $test   = $encode.GetString($data)
            if($test.Contains("text to find.  usually the namespace of the assembly of custom dll") -or $test.Contains("more text"))
            {
                  write-host $w.url $wf.Name
            }
        }
    }


} 

Monday, June 13, 2016

Fix Designer error: Server-side activities have been updated. You need to restart SharePoint Designer to use the updated version of activities.

I have SharePoint Designer 2013 installed and working fine till I needed to install Visual Studio 2015 (I installed Enterprise but this error seems to occur with other versions).   So I researched the issue where some say, you have to un-install then re-install in particular order. 


Just run a repair on the SharePoint 2013 designer in control panel.   If you still get the error, then check the cache folder in your user profile and make sure you have the following files:


replace the <yourname> and <sitename> with your information below.


c:\Users\<yourname>\AppData\Local\Microsoft\WebsiteCache\<sitename>\versionnumber\


Microsoft.SharePoint.WorkflowServices.Activities.Proxy.dll
Microsoft.Web.Design.Client.dll