Skip to content

Bug in business process flows created before december 2016 update (CRM v8.2)

Posted in Dynamics 365, Power Platform, and Revive

Microsoft has intoduced some really nice features with Dynamics 365 (CRM v8.2), but also a bug for business process flows of existing customers created before the december 2016 update. This causes an error message on switching to another business process flow or the completly disappearance of the business process flows from the form.

Jiří Pešík has already blogged a method to identify and resolve the issue, but from my point of view it is not cloud suitable and not supported,because there are changes made directly on the database.

Cause

With the new features came also new fields in the system. Unfortunately they haven’t been filled during the update for already existing business process flows. One of them is the required field “uniquename” of the “workflow” entity. You can even see it when open the details pane of the new business process flow editor.

Identification

You can use a simple query in the advanced find to identify concerned business process flows.

Resolution

Is just as easy as the identification. Deactivate your business process flow and the system will fill the name automatically and you can activate it again immediately. No code, no sql, just magic. 😉

20 Comments

  1. I agree with Benjamin, it is always better to avoid direct changes in database. I have added a note to my article.
    It’s a shame that easy solution like this did not cross my mind.

    12.02.2017
    |Reply
    • Jiří ,do not judge so hard about yourself. I’ve heard from colleagues that the solution of Microsoft Support is also an update in the database. I would rather call it a pragmatic approach.

      12.02.2017
      |Reply
  2. Francis

    You can’t deactivate a process with no unique name, at least in my instance it errors out trying to do so. So it will need to be a direct SQL update.

    17.02.2017
    |Reply
    • Hi Francis, sorry to hear that. For me it worked three times in different CRM Online instances in that way.

      17.02.2017
      |Reply
  3. Iskender Sheard

    Hi Ben,

    We had a problem with our business process flows after upgrading to Dynamics CRM 2016. What was happening is that the business process flow was disappearing in opportunities once the opportunity was created saved and closed. When it was next opened the business process flow was not there anymore.

    I hunted around quite a bit and found your article on how to solve the problem. Basically you say to deactivate the business process, reactivate it again and the problem is solved.

    https://community.dynamics.com/enterprise/b/leichtbewoelkt/archive/2017/02/08/bug-in-business-process-flows-created-before-december-2016-update-crm-v8-2

    Having done that though, I now cannot move to the next sales stage on existing opportunities.

    I get this error message:

    Record Is Unavailable
    The requested record was not found or you do not have sufficient permissions to view it. If you contact support, please provide the technical details.
    Show technical details
    Activity ID: 72389f19-227a-422f-90bb-9c6d39817929
    Timestamp: Sat Feb 25 2017 21:37:41 GMT-0500 (Eastern Standard Time)

    Here is a copy of the error log.

    s:Clientnew_bpf_3e8ebee6a2bc44519c5fb146b085413a With Id = d3d6af1f-ebf6-e611-8104-e0071b6a1051 Does Not Existb3dc0ef6-7158-4159-9f68-b8a137f6f761-2147220969new_bpf_3e8ebee6a2bc44519c5fb146b085413a With Id = d3d6af1f-ebf6-e611-8104-e0071b6a1051 Does Not Exist2017-02-26T17:03:26.4555754Zb3dc0ef6-7158-4159-9f68-b8a137f6f761-2147220969new_bpf_3e8ebee6a2bc44519c5fb146b085413a With Id = d3d6af1f-ebf6-e611-8104-e0071b6a1051 Does Not Exist2017-02-26T17:03:26.4555754Zb3dc0ef6-7158-4159-9f68-b8a137f6f761-2147220969new_bpf_3e8ebee6a2bc44519c5fb146b085413a With Id = d3d6af1f-ebf6-e611-8104-e0071b6a1051 Does Not Exist2017-02-26T17:03:26.4555754Z
    [Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]
    [4220af05-74a0-46f4-a8b4-d179884f4378: GlobalActiveStagePlugin]

    I then found out that when I create a new opportunity – everything works. I can move to the next sales stage.

    But when I try with existing opportunities (pre your fix) Icannot move to next sales stage and now cannot even delete the old opportunity.

    Do you have any insights into what to do here? I am a system administrator and I am supposed to have all the rights to everything.

    Let me know if you come up with anything to solve our problem.

    The best solution would be to be able to advance in the sales stages in the existing records if possible without having to delete everything and start afresh.

    I would however like to be able to delete some of these old opportunities if I wish.

    I can close old opportunities, change dates on them and do lots of stuff. Just not move sales stage and not delete.

    Any ideas?

    Thanks,

    Iskender

    26.02.2017
    |Reply
    • Hi Iskender,

      this seems to be another issue related to the BPFs. However, I found two ideas in the community that I want to share with you.

      1. As far as I read it in the community, it’s an know issue and Microsoft can fix it with a script. This sould be the fastest and cleanest solution.

      2. An other post in the community describes that there are misssfilled values in the field “Business Process Type” for the BPFs records in the workflow entity. The value for this optionset should be 0 (zero) which represents “Business Procress Flow” but it is null.
      You can proove this with the following url: “{YourUrl}/api/data/v8.0/workflows?$select=name,uniquename&$filter=category eq 4 and businessprocesstype eq 0”. If you get any results for your BPFs the next step would be to consider how to change the value.

      Please keep me up to date.

      01.03.2017
      |Reply
  4. Thomas

    Hi Ben,
    I faced a similar issue, that I could solve with the SQL query to fill in the BusinessProcessType to 0 and give a UniqueName.

    However, the migration to 8.2 did not migrate the existing BPF on opportunities. not a single one 🙁
    My leads were properly migrated, meaning I can find thousands of records in the BusinessProcessFlowInstanceBase table. But none have been created for the BPF associated to opportunities.

    I did an ‘inplace’ migration as it was my Test Environnement.

    Do you know anything about that ? In particular, does the fix provided by MS also adress this issue or only the empty field on the workflow table ?

    Rgds,
    Thomas

    14.03.2017
    |Reply
    • Hi Thomas,
      I think that as we’re talking about different issues, that Microsoft has a solution for that too, but I don’t know.
      You could also try to create the missing records through webapi calls by your own. But I’m not sure if it will work.
      Regards,
      Ben

      17.03.2017
      |Reply
  5. MichaelH

    Has Microsoft recommended any other solution?
    I cannot deactivate the BPF and would rather not change the database values directly.
    Please let me know if three’s any other alternative or hotfix released.

    14.03.2017
    |Reply
    • Hi Michael,
      have you tried to change the BPFs record status with an webapi call? Perhaps its “only” an UI thing that won’t let you deactivate the record.
      Regards,
      Ben

      17.03.2017
      |Reply
      • Hey Ben,

        I was able to solve the issue we were having.

        I heard the next update will fix the bug but unfortunately we are on-premise and I have yet to hear about a ETA on when it maybe released for on-prem customers.

        Deactivating the workflows didn’t help unfortunately either and we don’t have any support plans with MS so any issue requests we would have to buy support (for a small Canadian company that’s currently expensive and would be a last resort for us).

        I did get around the errors for existing records by doing the following:
        1. I copied each of our existing BPF for leads, opportunities, and projects and deactivated the existing BPFs. This allow me to get past the “Unexpected Error” popup when trying to select a BPF in the “Switch Process” screen.

        2. Exported to excel all existing records for each of the record types that are open (~800 total) with the process and process ID column in the listing. I then got all the IDs for all the BPFs and started inputting the values into the spreadsheet for each record type. I then re imported the sheets into CRM, effectively switching the BPF from the old to new for all existing records. This worked quite well and resolved my issue for all existing records that were open.

        The issue is now resolved and hopefully someone else finds this helpful if their running into the same issue.

        22.03.2017
        |Reply
        • Thank you for sharing your solution with us!

          23.03.2017
          |Reply
  6. JamesR

    This issue is proving to be a big headache for us, does anyone know when a fix will be available? Or have a copy of the script that MS use to fix the issue?

    25.04.2017
    |Reply
    • Please have a look at Jiřís blog post that I mentioned already above. He has added an update at the end of his article with the solution provided by Microsoft.

      25.04.2017
      |Reply
  7. JamesR

    Cheers Ben and it works! 🙂

    28.04.2017
    |Reply
  8. raj

    Environment:
    upgrading from CRM 2015 to Dynamics 365 (v8.2);
    CRM Dynamics 365 (v8.2.1.176) – On Premises Deployment
    http://wbrcrmpoc2016:555/Sandbox

    Entity Case
    Business Process Flow: “Communities Case”

    Repro Steps:

    Revenues -> Cases -> Select any record to open Case Form

    Expected Result: Business Process Flow rendering properly
    Actual Result: BPF does not rendering properly until user click on the arrow in the right side

    Give any suggestion on this issue ..

    Thanks & Regards,
    Raj

    15.06.2017
    |Reply
    • Hi Raj,
      this sounds to me like a different issue. I suggest you try out what happens with a BPF that has been created after the update and have a look at the traces. Check also the network traffic with fiddler.

      18.06.2017
      |Reply
  9. As you said, magic. Saved me hours of extra work. Thank you!

    23.08.2017
    |Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.