cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jja
Post Prodigy
Post Prodigy

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
Super User
Super User

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
Super User
Super User

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
Post Prodigy
Post Prodigy

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
Super User
Super User

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

@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
Post Prodigy
Post Prodigy

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,659)