Imagine a following Dataverse situation; you have this condition
Your flow will trigger every time something happens in the competitor table, resulting in many useless executions.
Thankfully there is an interesting setting called Trigger Conditions (Specify one or more expressions that must be true for the trigger to fire)
The flow with fire only if the competitor is Microsoft
Let’s try to execute a flow with name Microsoft
The flow executed as expected:
Let’s try a different competitor
As expected, no execution.
There is a one problem, however
When you are trying to troubleshoot, it could be tough to understand what something does not trigger. The trigger condition is not visible at a glance.
My suggestion is to indicate in the name that trigger have conditions and add a note.
This way, when you look at your flow, at a glance, you see which ones have trigger conditions.
Of course, feel free to have you own naming convention
A little spelling mistake can range from very annoying to mission-critical. Today I have wanted to share with you my latest discovery/brainstorming.
Let’s look at the following scenario. You are the sales organization, and your sales reps continuously look for new leads. They are so busy that they forget or entirely not sure how to check existing accounts. Also, leads can come from different sources (WebAPI, manual, Excel, SSIS). You would like to have a non-invasive way to indicate potential duplicates
You want to let the Lead’s owner that you already have a similar account. For example:
You have account name “Microsoft”
You have leads (“Microsoft”, “Le Microsoft”, “Micro-softttt”, “Mirco soft”). The spelling is almost similar, not quite.
What are our options? I always suggest keeping a copy of our data in Azure SQL. True, it is not free, but so worth it. There numerous ways to sync Dynamics 365 with Azure SQL but let’s use Power Automate.
Create SQL Server Tables, and we will populate the on create using Power Automate
AccountSync
LeadsSync
Let’s populate them using Power Automate
Let’s do the same with Contacts
Now let’s see what we have in our Azure SQL Database
There are tiny annoying spelling mistakes. So, let email that admin and hopefully have it corrected. But how?
We can use Levenshtein Distance Algorithm for the string comparison. If you are good at math, read more about it here Levenshtein distance – Wikipedia
For us, all we care about is the code for SQL Custom Function. The code will be included in the end
Let’s test our function. The distance indicates the character difference between the origin and the destination.
Let’s do the full Query where a difference in spelling is 10 characters.
Or exact match
Now, all we need to do is to create a Power Automate Flow to monitor the database and send a daily report to the owner of the record or an admin
The result of the flow is an HTML table that can be sent by email
As some of you might know, I am the part of the organizational committee for the amazing event. Please come register as a speaker or attendee. Enjoy Dynamics 365 and Power Platform with a Caribbean flavour.