PowerApps – Duplicate Detection in Dynamics 365



Hello Folks, As committed I am starting a new series called \”PowerGuide Mentorship Program\”

Intention of the PowerGuide Series is to share very interesting Ideas, Tips and Tricks related to Power Apps, Power Automate, Power Virtual Agent, PowerApps Portals and many more interesting stuff.

Today, I am going to share my first post of this series, where we\’ll learn about implementing Duplicate Detection in PowerApps while creating record in Dynamics 365.


Scenario – While creating a lead in Dynamics 365, check whether lead of same emailadress already exist or not, If exist then display duplicate emailaddress error message.

Let\’s get started…

Step 1:  Screen 1 – Create a Blank Canvas App > Connect with Dynamics 365 Data Source > Connect Lead Entity as Dataset (You can connect other entity also as per your requirement)































Step 2:  Screen 2 – Insert a new Blank Screen to show Duplicate Detection Dialog

Step 3:  Add few Text Input and Button Controls in Screen 1 or design as per your need.

Step 4:  Add below formula on Button Control (onSelect property) to find Duplicate Record

If(IsBlank(
LookUp(Leads,emailaddress1 = emailAddress_1.Text)),
UpdateContext({result: \”Duplicates Record not found\”}),
Navigate(DiuplicateDetectionDialogBox,ScreenTransition.CoverRight)
);


























You can use following formula also on Button Control (onSelect property) to find Duplicate Record

UpdateContext({recordCount: CountIf(Leads,emailaddress1 = emailAddress_1.Text)});

If(recordCount > 0, Navigate(DiuplicateDetectionDialogBox,ScreenTransition.Fade))
























Step 6: Test the App


Stay Tuned for PowerGuide – Tip 2 – Upsert/Patch Record in Dynamics 365 using PowerApps.

Cheers.

Published by arpitpowerguide

My name is Arpit Shrivastava, who is a Microsoft MVP in the Business Applications category. I am a Microsoft Dynamics 365 and Power Platform enthusiast person who is having a passion for researching and learning new things and acquiring immense knowledge. I am providing consistent help, support, and sharing my knowledge through various Social Media Channels along with my Personal Blog, Microsoft Community, conducting online training and attending various 365 Saturday Events worldwide and sharing the best Solutions to the readers helping them achieve their goals and objectives in Customer Relationship Space.

3 thoughts on “PowerApps – Duplicate Detection in Dynamics 365

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: