Power Community

Power Community

Duplicate Detection in Dynamics 365 using power apps

User Case: When setting up a contact in Dynamics 365, verify if a contact with the same email address already exists. If it does, prompt an error message indicating a duplicate email address.

Step 1:  Navigate to make.powerapps.com, screen 1 àCreate a Blank Canvas App à Connect with Dynamics 365 Data Source à Connect Contact 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.


LookUp(Contacts,emailaddress1 =Emailaddress_Text.Text)),

UpdateContext({result: “Duplicates Record not found”}),




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

UpdateContext({recordCount: CountIf(Contacts,emailaddress1 = Emailaddress_Text.Text)});

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

Step 5: Test the App


Before running the App, I’ve taken the existing email address from an existing contact.


And I’ve entered details into the App. Upon clicking ‘Submit,’ the Duplicate Detection Screen will appear.


If you provide a new email address that does not exist in the contact records, the result will be display as “Duplicates Record not found”. You can find result from variables.


Thank you..!

This post was originally published on this site

- Advertisement -spot_img


Please enter your comment!
Please enter your name here

- Advertisement - Advertisement

Latest News

5 Benefits of In-App Notifications for Microsoft Dynamics 365 CRM users

For a successful sales process, you need to stay up-to-date with crucial sales information like deal closures, opportunities won,...

More Articles Like This

- Advertisement -spot_img