Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
Greetings guys, I have a requirement that has to do with field service and I've met a really strange situation.
My client wants a .doc file to generate and attached to a bookable resource booking every time that its field "booking's status" turns to "Completed". For that I used a workflow with a SetWordTemplate action, and it works great. The status turns to "Completed" and voila a single .doc file is generated and attaches to the booking. Perfect.
Now, I have to say that besides that workflow, the field "booking status" update triggers a (synchronous) plugin as well. Moreover we have several plugins running on updates of different fields of the booking other than the status (let's say that one of them is the field "Return Time"). When the user fills the "Return Time" field with a value, sets the booking status to "completed" and saves the entity, two plugins are running on the background. It takes some time but they do their work as planned. However, to my unwelcome surprise, when they complete, there are several identical.doc files attached to the booking. The worfklow is supposed to run only once though, and it seems the delay of the plugins run have caused the flow to run multiple times. Now if I update only the "Return Time" field and save, then update the booking status to complete and save, only one .doc is generated. Any idea why is this happening and how I can face it?
PS: The plugins do not update the field booking status somewhere, there's no loop.
I have experienced similar issues when workflows run asynchronously. My general approach for this problem is to trigger the workflow/process in a plugin, because in plugins you can explicitly check if the state has changed to completed for the current event by inspecting both the preimage and the changing fields
While this does mean the process is not entirely configurable in the UI, it means less chance of missed or duplicate executions of the process
Can you please check if your plugins perform an update directely on the target entity.
You can also play with the execution order. In fact, you can avoid simultaneous executions between your plugins.
The delay is not the problem.
You mention the word flow in you description Is it s Flow or a Workflow? (a flow would trigger on any update)
Look at the audit history to see if there are multiple updates showing the field in question (your plugins may have an update transaction that includes the field in question as part of the transaction even though the value does not change it would still trigger as an update on the field as the field is part of the update).
You may need to implement a flag or date field that you update to indicate that the process has already run and then check that field in your flow/workflow.
Business Applications communities