cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Dataverse Flow triggering twice on field change - Trigger Condition issue

Hi All,

 

I have a Dataverse trigger Flow which is triggered when a PSA Invoice is Marked as Paid i.e. an out-of-the-box ribbon button on Invoice, the OOB field it changes is Project Invoice Status (msdyn_projectinvoicestatus)
button.png

And when I click this button, the Invoice is marked as Paid, but the Flow is triggered twice - 
triggerdTwice.png

This is what the Flow trigger looks like - 

flowTrigger.png

We have a Trigger Condition that is fired off a very specific condition i.e. Project Invoice Status = "Invoice Paid"
condition.png

Also, to back this up, the Audit history looks like it was changed only once.

audit.png

 

 

Any thoughts on why this is the case? The Flows shouldn't be triggered more than once as per the last screenshot where it is changing the field only once (and then the other fields are changed, and not Project Invoice Status)

When trying to work with other fields, it correctly gets triggered only once.

 

Kindly advise! 🙂

9 REPLIES 9
Haw_Isaac
Frequent Visitor

We are seeing a very similar phenomenon with our quote entity, albeit only intermittently.

 

We have a ribbon button that sets the status to submitted and a flow that triggers on that status alone.

Haw_Isaac_0-1641577633692.png

 

We both viewed the audit in application and via XRMToolbox and both showed a single update:

Haw_Isaac_1-1641577685306.png

 

However the flow still triggered twice. Interestingly, the second flow that triggered showed the record had a modified date that was 19 seconds after the first that had triggered:

 

Haw_Isaac_2-1641577782947.pngHaw_Isaac_3-1641577792229.png

 

We still haven't found the root cause, but I am wondering if it might be a double post of the status field updating even though the audit shows a single update.

 

Please share if you found the cause in your case!

ManishJain
Solution Sage
Solution Sage

Hi @priyeshwagh777 & @Haw_Isaac ,

 

Can you please check if there are any other plugin or workflow running in the background on change as this happens within milliseconds you wont be able to notice. 

 

Also as @Haw_Isaac mentioned, can you please put the column and condition in Select Column and Filter rows condition parameter.

 

Thanks

Hi @Haw_Isaac & @ManishJain ,

 

When I worked with Microsoft Support on this, I learnt that this was being caused due to 2 Callback Registration records being created in Dataverse. This causes the Flows to trigger twice for the same operation.

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/entities/callb...

 

Now, I don't recollect what was the exact fix but all we did was based on some criteria upon comparing, we just had to delete 1 of the callback registration records in order for the Flow to Run only once as it's supposed to.

 

If possible, I'll try to get in touch with the support to understand what we'd done back then.

Hope this hint helps! Thanks! 😊

 @ManishJain @Haw_Isaac 

 

I also noticed the same issue in one of our client env. The cause of the issue was the same. Duplicate callback registrations were present in our env. You can always open a ticket with the Microsoft support team and they will assist you. But to make things clear I am going to explain what they did in our env.

 

You can always check all callback registrations that are registered for your env and mitigate the issue. 

 

  1. First, you need to identify if there is duplicate callback registration for the same flow. You can use web API to retrieve all the callback registration. This can be a little tricky. You need to compare the "entityname" and "
    filteringattributes" property to identify the duplicate registration.
    •   Link for getting all callback registration :- [org URI]/api/data/v9.0/callbackregistrations

     2. Once you have identified the duplicate call back registration. Grab the "callbackregistrationid" value.

    3. Delete the duplicate callback registration. You can either do it using the web API or a simple flow.

Naveen_772_0-1641732729898.png

 

I hope this helps you a little bit. 

 

Thanks,

Naveen

 

 

Thanks @Naveen_772 ,

 

Yes, that's what they did for us as well. Additionally, they also had a specific script to run and identify which of the callback registration to remove.

I'll get in touch with MS Support and see if I can get the exact steps.

Thanks!!

kevmscotland
Frequent Visitor

We're encountering a similar issue. We tend to find a deployment creates a duplicate callback registration but we heavily use Power Automate Flow in our system, and continually reviewing the callback registrations for duplicates is a problem we really need resolved.

I'm curious from your time at Microsoft if you have a greater understand of how the Callback Registration works.
We noticed that newer Dataverse connectors seem to use the Flow ID as the name on the callback registration, but this does not apply to Legacy Dataverse callback registrations.

There doesn't appear to be any direct link or relationship you can use to trace a callback registration directly to its Flow, unless I'm missing something else?

I managed to fix by repointing the LA trigger to a different entity.  Saving.  Then repointing back to Account.  Problem solved!

 

I was facing exactly the same issue with a LogicApp.  Root cause seems to be two Callbackregistration records being created when my triggering Account field was modified.

 

After trying EVERYTHING (turning LA on and off again, turning off workflows, plug-ins etc, setting concurrency to 1...) I tried the above solution and couldn't believe it when it worked.

 

My LA is being used to create records in another system so just in case this randomly crops up again I've inserted a Delay step using a random number expression to wait 1-180 seconds -  "rand(1,180)".  If two runs do get kicked off simultaneously  this random delay allows me to add a check if the other run gas already kicked in (by fetching the source record again with a "Get row by id") and checking if it still meets criteria to be processed.

 

Toshiki79
Frequent Visitor

I'm facing the quite similar situation and I'm trying several workarounds before contacting MS to find out the solution for Duplicate callback registrations.

 

I have a cloud flow that is triggered when a Dataverse for Teams row whose column "Status" is updated from "Draft" to "Submitted" (e.g. User creates the row on "Create" Powerapps Canvas app form with status "Draft", then updates it to "Submitted" on "Confirmation" form). The time between creating the row with "Draft" and updating it to "Submitted" could be short, depending on user's action on Powerapps Canvas app.

If a user waits a bit longer (e.g. 10 seconds) to update the status, the flow runs only once. If it is done in less than 3 seconds on the other hand, the flow somehow runs twice.

 

Therefore, I only added a timer control onto the "Confirmation" form where users update the record status to "Submitted" so that its update, SubmitForm(), should wait for 15 seconds at least. After implementing it, I haven't faced the problem so far.

It didn't work after all and I've raised a support inquiry with MS support already.

Seems that there're too many inquiries from all over the world  for them to handle and I've still been kept waiting.

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (888)