For those of you who have already done so or plan to migrate to Dynamics 365, there appears to be a bug with business process flows whereby they won’t appear on records. I’ve seen reports this is now fixed for online deployments but unfortunately there’s no such luck for those of us on-premise.
In this article I will hopefully fix the problem for you.
The Problem
When migrating, the BPF’s should have a field called ‘Unique Name’ populated as it is a required field however this doesn’t happen which breaks the BPF’s. As I’ve shown below.
There is also a column in the SQL database called BusinessProcessType which also has a null value which should be set to 0.
The Fix
To fix this we need to in some way populate the fields, I’ve seen reports of some being able to simply deactivate then reactivate the processes to get this to populate so try that first and if it works then great otherwise follow the steps below which were first covered in detail on Jiří Pešík’s blog (I’ve attempted to provide clear instructions and a SQL script to fix the problem for you below) to update the SQL database directly.
This can potentially damage your CRM database so back up first.
- Access the SQL server for your CRM deployment.
- Open SQL Management Studio and connect to the database.
- Click ‘New Query’ and then query for the following making sure to replace ‘OrgName_MSCRM’ with the correct database –
SELECT [Name], [Description], [BusinessProcessType], [UniqueName] FROM [OrgName_MSCRM].[dbo].[Workflow] WHERE Category = 4 and UniqueName IS NULL or Category = 4 and BusinessProcessType Is NULL
- This query will find all affected Business Process Flows and display them. Affected BPF’s can be identified by UniqueName and BusinessProcessType being set to Null which causes the issue.
- Now run the following query which will modify all affected BPF’s, changing BusinessProcessType to 0 and generating a UniqueName from a prefix + WorkflowID similar to the standard UniqueName’s value (Be sure to change ‘OrgName’ and the prefix ‘SPCRM’ as required) –
USE [OrgName_MSCRM] GO UPDATE dbo.Workflow SET [BusinessProcessType] = 0, [UniqueName] = 'SPCRM_bpf_' + replace(cast([WorkflowId] as char(36)), '-', '') WHERE [Category] = 4 and [UniqueName] IS NULL or [Category] = 4 and [BusinessProcessType] Is NULL GO
- If you now open one of the affected BPF’s you should see the Name field is now populated similar to below –
- All affected records should now display the Business Process Flow correctly –
Hopefully this has helped a few people, if so please leave a comment below and don’t hesitate to suggest anything else you want me to cover.
…Shared to Facebook
LikeLike
Great read.
LikeLike
Hello Nam, I’m glad I could help. If there’s any topics you would like me to cover or if you spot any mistakes don’t hesitate to get in touch.
LikeLike
Thanks, that did the trick for me.
LikeLike
I’m glad, anything you found difficult or had to do differently?
LikeLike