Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Flow triggering from wrong environment

  • 1.  Flow triggering from wrong environment

    SILVER CONTRIBUTOR
    Posted Jul 25, 2020 11:46 AM
    The flows in Production are triggering from multiple environments.  I WAS using "current environment" but changed to specify the environment to try to break this apparent linkage,  but it does not help.

    It does not matter if the Flow exists in both environments or not.  It seems that the Production Flow is "seeing" the other environments.

    I was able to seemingly break the linkage on ONE flow by renaming it in the alternate environment, but this has not worked on the other flows.

    Any ideas on how/why this is happening and how to stop it?

    ------------------------------
    Paul Richards
    BlueCrest Inc
    Danbury
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Flow triggering from wrong environment

    Posted Jul 27, 2020 01:46 AM
    Hi Paul,
    I recently had the behaviour that a flow was duplicated and I wasn't able to reach the duplicate. It ran and ran, noch chance to getin touch.
    Microsoft helped to delete the Flows.
    Seems that Flows are a little bit buggy overall, check out for still running deprecated flows, perhaps they are responsible. Make a ticket at Microsoft to get help deleteing them.
    I also had many situations were we have to wait for changes on triggers have to be reflected, sometimes also a recreation was needed.
    Regards,
    Marc

    ------------------------------
    Marc Lübberstedt
    SYCOR GmbH
    Göttingen
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 3.  RE: Flow triggering from wrong environment

    GOLD CONTRIBUTOR
    Posted Jul 27, 2020 02:37 AM
    Hi Paul, I have also experienced this issue and must say it is really scary not to be able to have proper ALM with flows. Particularly have flows triggered from power-apps (canvas) been buggy. I am happy to read these days that they are doing something with it in Wave 2 this year.
    Anyway, the solution for me is to always follow this procedure:
    1. Move the flow with solution (if it is not canvas PowerApp triggered, this was not supported last time I checked)
    2. Open the flow, change from Current Environment to a specific one and save the flow
    3. You might verify at this point that the flow is triggered in correct environment
    4. Change back to Current Environment trigger and save.

    Note that there are two CDS connectors, last one called CDS (current environment). I am not sure if they solved this problem in that one, but I read id might be a problem when you copy environment. I read that in this blog post https://saralagerquist.com/2019/12/15/cds-vs-cds-what-connector-should-i-use-in-power-automate/#:~:text=2.,on%20one%20event%20per%20flow

    ------------------------------
    Zarko Radevic
    Dynamics 365 developer
    Digitale Medier 1881 AS
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 4.  RE: Flow triggering from wrong environment

    TOP CONTRIBUTOR
    Posted Jul 29, 2020 01:20 PM
    I had something kind of similar, but in my case I was promoting the Flow from DEV to TEST environment, but the changes were not taking hold.  I ended up deleting the flow in TEST, then re-promoting it from DEV and it worked.

    Worth a shot.

    ------------------------------
    Chris Harrington
    Solutions Architect
    PowerObjects, an HCL Company
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 5.  RE: Flow triggering from wrong environment

    SILVER CONTRIBUTOR
    Posted Aug 20, 2020 07:22 PM
    Sorry for being slow to follow up on this post.  It turned out that when you copy your Production environment to another (Dev, Train, etc) the callbackregistrationid of your flows get copied along with the other data.  This results in Production flows "seeing" the actions in the other environments and triggering.  The resolution is to delete the duplicated callbackregistrationid in the alternate environment.

    Keep a list of all the Production callbackregistrationid's handy for the next time you are making a fresh copy!

    ------------------------------
    Paul Richards
    BlueCrest Inc
    Danbury
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 6.  RE: Flow triggering from wrong environment

    GOLD CONTRIBUTOR
    Posted Aug 21, 2020 03:00 AM
    Thanks for that Paul, worth to mention that you cannot query via advanced find, I used OData endpoint, I guess you have to delete via code.

    ------------------------------
    Zarko Radevic
    Dynamics 365 developer
    Digitale Medier 1881 AS
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 7.  RE: Flow triggering from wrong environment

    SILVER CONTRIBUTOR
    Posted Aug 21, 2020 09:25 AM
    Correct.

    To find your callbackregistrationid use the following:

    https://<environment url>/api/data/v9.0/callbackregistrations

    To delete the callbackregistrationid, you can use the Postman Tool.

    Follow the instructions from Microsoft to install and setup the tool: 

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/setup-postman-environment

    Then use the Delete function with the syntax: {{webapiurl}}callbackregistrations(<callbackregistrationid>)



    ------------------------------
    Paul Richards
    BlueCrest Inc
    Danbury
    ------------------------------

    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


If you've found this thread useful, dive deeper into User Group community content by role