
I am running into a duplicate key error while trying to import data using a custom data entity, and I'm hoping someone can point me in the right direction.
The Scenario:
I created a duplicate of the standard TaxRegistrationBaseEntity. The customer registration records include ValidFrom and ValidTo date fields, along with some RecIds being saved for TaxRegistrationTypeApplicabilityRule and DirPartyLocation.
The Issue:
When I export data and immediately try to re-import using this duplicated entity, I get a duplicate key error. Upon investigating, I noticed that my custom entity has a different Entity Key compared to the underlying table's primary index.
Target Table: TaxRegistration
Data Entity: Custom duplicate of TaxRegistrationBaseEntity
Has anyone encountered this specific key mismatch issue when duplicating this entity? How should I restructure the Entity Key to properly handle the date-effective fields and RecIds so the Data Management framework performs an update instead of attempting a duplicate insert?
also another issue is sometimes i get "Results. update not allowed for field 'TaxRegistration.TaxRegistrationTypeApplicabilityRule'".
Any advice or pointers on how to resolve this mapping would be greatly appreciated!