web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Duplicate records must be removed the file prior to import

(1) ShareShare
ReportReport
Posted on by 1,552
Hi,

I made an entity with natural key line num -- this field gets autocreated in the insert method.

I made access modifier for the linenum in the entity as private

when i want to import, i don't want to fill the linum -- it should be filled with the insert method
when i export i don't want to see linenum as well


i tried to import where the table is empty but got this error
The keys of the record are DEFINITIONGROUP, EXECUTIONID, LINENUM, PARTITION. Duplicate records must be removed the file prior to import
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    305,823 Super User 2026 Season 1 on at
    Hi Junior AX,
     
    As the entity needs unique records, you can write logic in the data entity to fill the linenum field with a sequence for the staging table. Then it would meet the requirement for the entity key. 
    What exactly is this table about? 
  • junior AX Profile Picture
    1,552 on at
    Hi Andre,
     
    The table is like a middle stage where we insert records to it before inserting to the actual tables.
    It has fields that are related to another table.. it also has status field(new, inProcess, error)
    There is nothing unique. So i added the lineNum as a natural key for the entity.
     
    I already added a logic to fill lineNum in the insert method of the table...is it not enough? Do i need to add the same logic of filling lineNum in postload method for example?
  • André Arnaud de Calavon Profile Picture
    305,823 Super User 2026 Season 1 on at
    Hi Junior AX,
     
    The error comes from the staging validation as the entity key should be unique in the source file. You can indeed try to fill the staging table using the postLoad() method. When possible, you can also add the line numbers in your source file.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 477 Super User 2026 Season 1

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 470 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 412

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans