cancel
Showing results for 
Search instead for 
Did you mean: 
Rahman1005

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)

Rahman1005_0-1710842494629.png

 

Rahman1005_1-1710842509874.png

 

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

Rahman1005_2-1710842522609.png

 

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

Rahman1005_3-1710842533166.png

 

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

If(IsBlank(

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

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

Navigate(DuplicateDetectionDailogbox,ScreenTransition.CoverRight)

);

Rahman1005_4-1710842549409.png

 

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

Rahman1005_5-1710842562069.png

 

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

Rahman1005_6-1710842585847.png

 

 

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

Rahman1005_7-1710842596973.png

 

 

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.

Rahman1005_8-1710842605865.png

 

Thank you..!