cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Responsive Resident
Responsive Resident

avoiding duplicate records in dataverse custom tables

Hi

What is the scenario to avoid duplicates in dataverse custom tables using standart dataverse data entry?

I assume records will always be not duplicate as entering new record dataverse generates unique GUID.

Can you pls suggest what to do?

2 ACCEPTED SOLUTIONS

Accepted Solutions
GuidoPreite
Resolver III
Resolver III

you can create an alternate key https://docs.microsoft.com/en-us/powerapps/developer/data-platform/define-alternate-keys-entity

in this way the user is unable to create a duplicate based on the criteria defined by the key (for example two accunts can't have the same account number)

 

View solution in original post

bipinshan
Solution Sage
Solution Sage

Hi @jja ,

 

You can also setup Duplicate detection rule in your instance to prevent creating duplicate records in yoru system.

 

https://docs.microsoft.com/en-us/power-platform/admin/set-up-duplicate-detection-rules-keep-data-cle...

 

Regards,

Bipin Kumar
Follow my Blog: https://xrmdynamicscrm.wordpress.com/

Kudos and Accept my answer if helpful!

View solution in original post

7 REPLIES 7
GuidoPreite
Resolver III
Resolver III

you can create an alternate key https://docs.microsoft.com/en-us/powerapps/developer/data-platform/define-alternate-keys-entity

in this way the user is unable to create a duplicate based on the criteria defined by the key (for example two accunts can't have the same account number)

 

jja
Responsive Resident
Responsive Resident

So do i understand correctly
in my table i have a project name, Equipment name, Epmploye number, task name, task status

If i define these columns as alternative keys - user will not be able to save same information?

bipinshan
Solution Sage
Solution Sage

Hi @jja ,

 

You can also setup Duplicate detection rule in your instance to prevent creating duplicate records in yoru system.

 

https://docs.microsoft.com/en-us/power-platform/admin/set-up-duplicate-detection-rules-keep-data-cle...

 

Regards,

Bipin Kumar
Follow my Blog: https://xrmdynamicscrm.wordpress.com/

Kudos and Accept my answer if helpful!

GuidoPreite
Resolver III
Resolver III

correct, you can also combine different columns in the same key (when you create the key it will show only the available columns because not all the types can be used) and the system will stop the user to create a new record with the same key

jja
Responsive Resident
Responsive Resident

@bipinshan 

Does this duplicate detection rule also prevent from entering into system or you can afterwards run some report to get all the duplicate records and then delete manualy ir set a job to be it deleted/merged?

Hi @jja ,

 

You can control when and where you want to apply your Duplicate Detection rule -

bipinshan_0-1643625097349.png

 

Regards,

Bipin Kumar
Follow my Blog: https://xrmdynamicscrm.wordpress.com/

Kudos and Accept my answer if helpful!

jja
Responsive Resident
Responsive Resident

Hi @GuidoPreite @bipinshan 
Both scenarios fit for me but i see i will have an issue let me describe:

in a table Components i store Project name, Component name, Component qty

In table Transactions i register what was done with the certain component so it looks liek this

Project name:Project1

Component name: A001

Component qty:1

Status: completed

 

But it might happen that i have the total qty of Component name A001 2psc

then if user registers the completed qty in separate records 1 by 1 this A001 and i enable duplicate detection rule it will not allow him to enter this another missing 1 psc from total 2

What would you suggest in this case?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,909)