Find all workflows where a field is used (Onprem only)

I have a customer with a TON of workflows and custom fields. I needed to figure out everywhere that a field was used in the workflows. After doing some Poking around in the database I created a simple SQL statement that tells me everywhere the field is used. In this case I have a field on the opportunity that I want to find out all of the surrounding workflows that affect it.

 

So I ran this SQL against the database and entered the entity and attribute.

SELECT w.categoryname, w.name, w.statecodename, w.statuscodename FROM FilteredWorkflowDependency AS wd INNER JOIN FilteredWorkflow AS w ON wd.workflowid = w.workflowid WHERE (wd.dependententityname = 'opportunity') AND (wd.dependentattributename = 'hci_allpaymentsreceived')

 

sql1

I now know the two workflows that this field is used in and can go from there.

Advertisements
This entry was posted in CRM 2013, CRM 2015, CRM 2016, Development, Onpremise, SQL, SQL 2005, SQL 2008, SQL 2012, SQL Server. 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 )

Google+ photo

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

Connecting to %s