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 :
Finance | Project Operations, Human Resources, ...
Answered

DIXF error : The data value violates integrity constraints

(0) ShareShare
ReportReport
Posted on by 897

Hi guys,

When trying to import data via Data Management - Import, my import task is failed. Looking at the Execution Log, it doesn't inserted to staging and if I go to Staging Log detail it say "The data value violates integrity constraints"

What is that means ? is the integrity by means the index key of the staging table it self ? But the index only 1 and it is the usual combination of the Definition Group + Execution Id + [myfield]

Like this ->

pastedimage1630987894617v1.png

And that JournalBatchNumber I did specified it in my Source file which is Excel.

On the other hand, I have several field in my source file I leave it blank, as it will be defaulted in the entity it self. I put the default value of those fields in method InitValue of the said entity. Is this allowed ? or is this the one that causing the error ?

Btw, for duplicate records is none because I only test with 1 row only in my Excel.

Thanks,

I have the same question (0)
  • Tony zhong Profile Picture
    897 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Will,

    Thanks it's work.

  • Verified answer
    WillWU Profile Picture
    22,359 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Tony,

    This seems to be a validation failure from the table level, you can try setting the value in the mapEntityToDataSource() method.

  • Tony zhong Profile Picture
    897 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi all,

    When we import data, like mine is LedgerJournalTable, and in the excel file I have given its Journal Number, is there anything special I need to set first in order for the Journal number in Excel effected ? Because currently, the staging is fine, all necessary field is in included Journal number, but it is failed with error like this :

    pastedimage1631004946696v1.png

    It is like they didn't apply my Journal number. In Journal number sequence I had check the "Allow manual" in its number sequence setting.

    Thanks

  • WillWU Profile Picture
    22,359 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Tony zhong,

    Yes, the data needs to pass the mandatory field and index checks before it goes to the staging table, and then it will run the entity method.

  • Tony zhong Profile Picture
    897 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Andre,

    It is my custom entity but the original table is LedgerJournalTable, with range is JournalType = Cost

    True to not make it mandatory, Based on your mentioned, so if it is inserted to staging already, then when copy to target, it will run my InitValue on that entity, am I right to say that ?

    Thanks

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    297,511 Super User 2025 Season 2 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Tony,

    What exact entity are you using? The error comes when a mandatory field in the staging table is not filled or when for a certain type the data in incorrect (e.g. text in a date field).

    If you want to default data which is not provided in the source file, the staging table should not have these fields mandatory. Note that during the step from source to staging, there is no business logic from the initValue method called. This step is done with help of SSIS which is on database level directly.

  • WillWU Profile Picture
    22,359 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Tony,

    The mandatory fields and index checks are handled at Kernel level, these entity method(such as intValue(),mapEntityToDataSource(),persistEntity()) will not be hit if the data are invalid.

  • Tony zhong Profile Picture
    897 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Will,

    Yes, I leave it blank, as I want it to be defaulted from InitValue method in that entity. Is it possible to do that ?

    Thanks

  • WillWU Profile Picture
    22,359 on at
    RE: DIXF error : The data value violates integrity constraints

    Hi Tony,

    Did you have any fields are blank 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

Responsible AI policies

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

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 789 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 607 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 497 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans