Tag Archive for: Power Automate

In Dynamics 365 Sales, duplicate detection exists but only works at an individual level, for example, when a lead is converted or a new account is created.

Unfortunately, there’s no out-of-the-box solution to automatically detect duplicates in bulk across the system. This limitation can lead to data inaccuracies, especially as your organization grows.

To overcome this challenge, I created a Power Automate flow that finds and merges duplicate accounts automatically.

In this article, I’ll walk you through how to create this flow, and you can adapt it for your own needs.

Flow overview:

(Apologies, I have not renamed some of the foreach and conditions, but I think you will understand 🙂 )

Step-by-Step Guide to Creating the Flow

Step 1: Set up the Trigger

The first step is to set up the trigger for the flow. We want this flow to run on a regular schedule to detect duplicates. Use the Recurrence trigger to specify how frequently the flow should run (e.g., daily or weekly).

Step 2: Query Accounts from Dataverse

Next, add an action to list all accounts from the Dataverse. This will retrieve all active accounts so that we can compare them and detect duplicates.

  • Action: Use List Rows from the Dataverse connector.
  • Filter: You can filter for only active accounts or specific criteria that make sense for your business.
  • Also initialize the variable Duplicates here as an array

Step 3: Identify Duplicate Accounts

Once the accounts are retrieved, you need to compare the names or other unique fields to detect duplicates.

  • Use a loop to go through each account and check for duplicate names.
  • Clear the array variable Duplicates
  • Implement a condition in the flow to identify if two or more accounts share the same name.

The Replace() is used to fix the acounts that have the character inside their name, to not break the odata filter.

Condition:

and(greater(length(outputs(‘List_rows_2’)?[‘body/value’]), 1))
If any duplicate is found (YES under condition), add the Account ID to the Duplicates array

Step 4: Merge the Duplicates

Once duplicates are identified, use Dataverse’s Unbound Action to merge the duplicate accounts. The unbound action allows you to merge records within Dataverse without having to handle the data manually.

  • Action: Use the Perform Unbound Action step from the Dataverse connector.
  • Target: The original account and the duplicate account.

Condition 3: (meaning one or more duplicates have been found)

length(variables(‘Duplicates’))
If YES, then take the first and the last account:
(Because you can only merge 2 accounts at the same time)
Get the first Account:
Get the last duplicated account:
Send me an email notification, and then do an Unbound Action (Merge):
That’s it, our entire flow is ready:
AccessOrange is a leading Microsoft Partner that specializes in Microsoft 365, Dynamics 365 and Azure to help our customers work smarter.
If you need help with building this flow in your own environment, leave your contact information below, and we will contact you as soon as possible.

"*" indicates required fields

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This field is for validation purposes and should be left unchanged.

Are you considering transitioning your organization from on-premise to online?

Are you already familiar with the basics of Microsoft 365?

If so, then it’s time to take the next step in smarter working with Microsoft 365 by utilizing Forms, Power Automate, and Lists.

Creating simple solutions is within reach!

One example of such a solution is a digital suggestion box, which can be built in three steps:

1. Create a form to collect ideas using Forms.

2. Set up a flow to store the ideas using Power Automate.

3. Create a list for all the ideas, including additional columns to track their progress, using Lists. Optionally, apply one of the many automation and integration possibilities.

Microsoft Lists:
Microsoft Lists provides lists for individuals and groups. These lists can be accessed from various devices and through different apps, including Microsoft Teams, allowing you to stay connected even when you’re on the go.

Adding columns and views to your lists is easy, and you can customize the formatting to make them visually appealing and organized.

Collaborating on a list is straightforward. Lists can be shared, have version history, and offer the ability to add comments to each item.

Integrations with other apps are easily accessible. With a few clicks, you can set up automatic email notifications for changes. Power Apps enables the creation of custom forms, while Power BI allows for quick reporting based on the list data. Power Automate enables automation based on the content of the list.

In a similar way, solutions can be created for tasks such as:

  • Requesting training sessions, including approvals.
  • Registering visitors, including confirmation emails.
  • Reporting system bugs, including status updates.

These types of solutions are enjoyable and achievable for advanced users. They enable more effective and efficient work processes.

  • Forms provide more comprehensive and structured input for a process.
  • Flows automate a portion of the work.
  • Lists offer an overview and generate new insights.
  • The data remains within the Microsoft 365 environment, which is already set up.
  • Licensing costs for third-party solutions can sometimes be eliminated.

Get started with a workshop

Initiating a structured approach to smarter working with Forms, Power Automate, and Lists is a great idea for any organization. It benefits users and promotes collaboration with IT.

AccessOrange can provide support in this endeavor, including workshops. A workshop involving advanced users and IT staff helps identify possibilities and opportunities in an engaging manner.

  • First, we provide a brief introduction to Forms, Power Automate, and Lists.
  • Next, participants create a digital suggestion box.

With proper guidance, this process is quick and satisfying, giving participants their first glimpse of the possibilities.

We then discuss the potential opportunities, and participants quickly come up with simple solutions they can create themselves.

After the workshop, we maintain contact because during the session, participants express their intentions to work smarter with Forms, Power Automate, and Lists.

  • Will they actually start implementing these ideas?
  • Would they benefit from IT support?
  • Will users or the IT department effectively manage the solutions?

After an initial period of use, these questions warrant further discussion with the participants who have started implementing the solutions and with the IT department.

 

Is this an interesting next step for your organization?

Together with my colleagues, I am committed to promoting smarter working with Microsoft 365 for users and administrators. We gladly provide workshops like these and offer ongoing support!

Andy Chan

Microsoft 365 Consultant

Let us help you Get Started

"*" indicates required fields

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This field is for validation purposes and should be left unchanged.