Flows triggered in wrong environments when a full data copy was restored

Flows triggered in wrong environments when a full data copy was restored

Couple of weeks back after production full data copy was restored on non-production environment we have faced a situation where a production flow was being triggered if a record was added/updated to the triggering entity in a non-production environment though the flow had the current environment connector configured on it.

With lot of investigation and support of Microsoft it was found that due to a callbacksregistrations that are created at the backend when you turn a CDS trigger based flow on. The import point here is restoring the environments backup or copy the environment to another environment those callbackregistrations to your flows do not get reset and are still pointing to the Flows of the environment you took the restore of causing the flows to trigger even if the environment is different.

Resolution: Identify the callbackregistration id’s on the entity your flow is being trigger off of. Todo so, need to execute the below query on your effected environment(i.e. non production).

https://name.crm.dynamics.com/api/data/v9.1/callbackregistrations(name,callbackregistrationid)

Result is a json message look for all callbackregistrationid’s and delete them one by one following the process below.

"callbackregistrationid": "e56228cf-081a-eb11-a813-000d3ab94e3f"

To Delete: Goto your restored environment and open up the developer console(F12 for chrome), and execute command below under console tab by replace the callbackregistration id fetch(‘https://name.crm.dynamics.com/api/data/v9.1/callbackregistrations(e56228cf-081a-eb11-a813-000d3ab94e3f)',{  method: ‘DELETE’}).

Make sure you do this for all id's against that entity, then navigate to your flow and turn off the flow, edit the flow and save it again and turn it back on

To view or add a comment, sign in

More articles by Aniket Malvankar

  • Microsoft Dynamics 365 Developer Toolkit with Visual Studio 2019

    Using the toolkit, you can create, develop, and deploy CRM plug-ins, custom workflow assemblies and web resources…

  • Customer Service Calendar Dynamic 365

    Spending almost a day to find the work hour under customer service calendar, I finally decide to write down my outcomes…

  • Auto-Number MS CRM Dynamic 365

    For couple of days I was struggling to get the Auto - increment numbering on Custom Entity. I went through many…

    1 Comment
  • Salesforce - Batch Apex

    Hello All, Thought to add some learning in Salesforce. I am sharing my first blog on small topic i.

Explore content categories