Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Flow Creating Records instead of Updating

  • 1.  Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Hello!

    I'm wondering if anyone has had a similar issue in Flow that it creates a record instead of updating. The Flow completes successfully and the update step shows success, but it is actually creating a record. I have an open ticket with MS Support, but it has been over a week with no solution.


    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------
    The first step toward cloud success. - Migrate from CRM to D365 with expert guidance from Microsoft. I'm Ready


  • 2.  RE: Flow Creating Records instead of Updating

    GOLD CONTRIBUTOR
    Posted 28 days ago
    Hi Kaitlin, I had a similar situation and the reason was that the record was deleted before the update step. The flow creates the record then again but only with those attributes you set in the update step. It was an approval flow, so users had plenty of time to delete the record before it got approved.
    Solution was simply to check if the record still exists before updating it. Hope this helps.

    Regards

    ------------------------------
    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


  • 3.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago

    Hi Zarko!

    I think you may be on to something there. I noticed in the audit history that it actually had record of the contact being deleted and then created again. I thought this was so odd. I'll add a screenshot below. I do have a step that is supposed to check if it exists first based on a primary key. I'll be honest I based this off an article I found and I'm not sure I understand the variable part...




    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 4.  RE: Flow Creating Records instead of Updating

    GOLD CONTRIBUTOR
    Posted 28 days ago
    Hey Kaitlin,

    Are there any other additional back end processes that could be triggered by this update that would potentially cause this issue? What triggers this flow? Thanks!

    ------------------------------
    Doug Apicella
    Solution Architect
    Hitachi Solutions
    SC
    ------------------------------

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


  • 5.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Edited by Kaitlin Burns 28 days ago
    Hi Doug,

    I don't have any workflows that could be triggered by this Flow. It is set to run at 8am every day and pulls from SQL. It's a pretty large flow, but I will put screenshots below in a separate chat. Thanks!!

    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 6.  RE: Flow Creating Records instead of Updating

    MICROSOFT MVP
    Posted 28 days ago

    Can you post more of the flow?

     

    Jerry Weinstock, Microsoft Dynamics CRM MVP
    Business Technology Strategist

    CRM Innovation LLC
    mailto:jerry@crmInnovation.com
    V: (913) 492.2764
    Description: mvpsig

     




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


  • 7.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    I copied this process from an article I read, so if this is more complicated than needed or if there's a better way I'd love to know!

    Overall:
    Initialize Variable and condition if the primary key (AddressGUID) contains data or not- we don't bring the record in if that field is blank
    Next, we check if the record is an Account or Contact based on a field called account type
    On the Group path, it lists group records (I'm not sure of the filter query here but the article I read had it?). It sets the variable as well.
    Lastly, it checks to see if the group should be created or updated


    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 8.  RE: Flow Creating Records instead of Updating

    Posted 28 days ago
    Before it can update a record, it has to find it first.  Are you sure your Flow found the record it needed to update?  If it didn't find it, this could be why it created a new one.  Look at the results of the flow prior to the update step and see if it actually found records to update.  Also, is it doing both - that is, is it updating the record AND creating a new one, or, is it just creating a new one so the two records are actually different (the newly created record would have more current information on it)?  The created dates on your records are very close together.  Is there a chance it is firing both an update and an insert step?  I agree that we need to see more of the Flow to try and figure out where it is going wrong.  I also agree that if you put a condition in to find the record and test the values (has anything changed) and then fall out of the update if you don't need to do it would fix the problem.

    ------------------------------
    Terry Letkeman
    Bespoke Technology Services
    Winnipeg
    ------------------------------

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


  • 9.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Hi Terry,

    I've added more details and screenshots of the flow in an above comment. The dates are super close because I ran it manually first to create and then second to see if it would update. Below is the last run where it was supposed to update the record but created a new one. The flow shows only updating. Also, I was telling Zarko above that in the audit history it shows deleting the record and creating it again, which seemed odd to me (I thought once you delete it's gone forever). There are screenshots in earlier comments that show the audit history. Thanks!!


    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 10.  RE: Flow Creating Records instead of Updating

    GOLD CONTRIBUTOR
    Posted 28 days ago
    Kaitlin, try to match the timestamp of deletion with flow runs, you might have a delete step there if you copied as you said. Try recreating from scratch and see if that helps, you will definitely learn more on the way. Try also searching for a plugin that might do the deletion, you can easily do this using plugin registration tool either downloaded as a part of the NuGet package or as a XrmToolBox tool. Good luck!

    ------------------------------
    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


  • 11.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Thanks Zarko. I did create from scratch and got the same results :( I will try looking for a plugin. Thanks!

    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 12.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 28 days ago
    Hi Katlin,

    Could you please delete the update step, and add a create, update, or delete step from CDS (Current environment). Changing it from CDS to CDS(Current environment) should help.

    Please let me know how that goes.

    Thanks
    Jay

    ------------------------------
    JayBuddhdev
    https://www.powerappsd365.com
    Regina SK Canada
    ------------------------------

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


  • 13.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 27 days ago
    Hello,

    I am using the CDS (current environment) on all of them. I deleted the update step and am re-adding it just to make sure.

    This time it updated just one of the records
    Now I will delete all the records and run the flow so all should be created:

    That worked as expected- new records were created.
    Next I run the flow again to see if it will update the already existing records:

    For some reason it created a new one with no Address GUID (our primary key) and did not update the existing. 




    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

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


  • 14.  RE: Flow Creating Records instead of Updating

    GOLD CONTRIBUTOR
    Posted 27 days ago
    I think that the value for the record id you are passing to the Update step is wrong, try hardcoding it once and see.

    ------------------------------
    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


  • 15.  RE: Flow Creating Records instead of Updating

    SILVER CONTRIBUTOR
    Posted 25 days ago

    Hi everyone!

    Microsoft support finally got back to me and the issue was resolved. Zarko you may be saying the same thing, but the issue was the Item ID for updating the group. I should have selected the Dynamics made ID instead of the Address GUID we use for mapping



    ------------------------------
    Kaitlin Burns
    Application Developer
    CareSource
    Dayton OH
    ------------------------------

    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