Wednesday, February 11, 2015

Find All References to a Custom Workflow Activity in Dynamics CRM 2013

If you ever need to find all the workflows that have references to a custom workflow assembly, you can query the Xaml column on the Workflow entity.  Using OData is the fastest way:

HTTP://MyCrmServer/MyTenant/xrmservices/2011/organizationdata.svc/workflowset?$SELECT=NAME&$filter=substringof('MyCustomWorkflowActivityClassName',xaml)

If you are on-prem, then you can also do this via SQL:

SELECT DISTINCT wf.NAME 
FROM   workflow wf 
WHERE  xaml LIKE '%MyCustomWorkflowActivityClassName%' 

No comments: