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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Why does AX 2012 data import from staging to target always overwrite 1 record?

(0) ShareShare
ReportReport
Posted on by 2,145

I have a custom table that I am trying to import data into. When importing into my staging table, I get 3 separate records. When importing from staging to target, it will create 1 record (if there are no records) and then 'update' that record twice. If there is already a record in the target, it will update that record 3 times.

I'm fairly certain this has something to do with this table(target) being a custom table, however, I can't figure out why the records always update. They are unique records.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    300,289 Super User 2025 Season 2 on at
    RE: Why does AX 2012 data import from staging to target always overwrite 1 record?

    Hi Bradly,

    You have to ensure your DMFstaging table has a primary index including the fields DefinitionId, ExecutionId and the primary key of the target table.

    Also check if the DMF staging table has a relation with the target table on your primary field. This might be your problem.

    Check e.g. the relations on an existing DMF staging table.

  • Erik Paulsson Profile Picture
    40 on at
    RE: Why does AX 2012 data import from staging to target always overwrite 1 record?

    Like Andre says, it seems like DMF has trouble finding the specific records you are trying to insert/update. The result is that the first record in the target table is always found.

    DMF uses the relations on the staging table to find records, if the exist. It does this by building a query in code with the DMFStaging table as base and then adds the related table using the relation. If the related record can not be found you will get an insert and if it can be found you will get an update. But if there is no relation at all, the first record of the target table will be found every time and this seems to be your problem.

  • bRadlyJames Profile Picture
    2,145 on at
    RE: Why does AX 2012 data import from staging to target always overwrite 1 record?

    Thank you Andre!  It was the relationship between the staging and target tables that I was missing.  Thank you!!

  • Community Member Profile Picture
    on at
    RE: Why does AX 2012 data import from staging to target always overwrite 1 record?

    Thanks André! the relation between DMF staging table and target table solved my problem :)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 3

#3
Aayyon Das Profile Picture

Aayyon Das 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans