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 :
Dynamics 365 Community / Forums / Finance forum / Import General journal...
Finance forum

Import General journal (Error: The data value violates integrity constraints)

(0) ShareShare
ReportReport
Posted on by 140

Hi all, 

I used Data management to import General journal.

Entity name is General journal. However, I can't import it.

This is error message : The data value violates integrity constraints

8664.Import-25.sep.png

1307.Sep-2.png

Does anyone know above case?

Thanks in advance

Van Nguyen 

I have the same question (0)
  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Van Nguyen,

    How many journal lines do you plan to import?

    If there are not too many (>1000) you can alteranatively use the standard GL journal addin that allows you preparing the lines in an Excel template through which you can upload the transactions.

    Might be the faster and easier way to get this resolved.

    Best regards,

    Ludwig

  • Mea_ Profile Picture
    60,286 on at

    Hi Van Nguyen,

    Did you check JournalName field in source file ? What is the value there, what type of file do you use?

  • Suggested answer
    Sangram Shinde Profile Picture
    2,120 on at

    There is some data issue in your file. Have you checked for any duplicate combination on JournalNumber and LineNumber, or any mandatory value left blank in file etc.

    Thanks,

    Sangram

  • santhosh kumar 1212 Profile Picture
    215 on at

    Today One of my friend faced the same issue "The data value violates integrity constraints". 

    The issue was there was two line of space extra in csv file and difficult to identify.

    this might be one of the reason too.

  • Suggested answer
    Matloob Profile Picture
    781 on at

    Hi Van Nguyen,

    This error does not pertains to one specific area, it could be due to the wrong format of the file chose to upload or due to the incorrect data provided in the file or one of the required field for that data entity used in data management project is not available in the file.

    In my case, i was using data entity "Registration numbers" to update Tax Registration Number for customer masters and during import of the data i was getting this error. Upon detailed investigation i got this that i had almost 2500 customer masters and all of the customers had data filled in the field called "Location ID", 3 customers were not having data available in "Location ID" so they are blank in the upload file which was in excel format. Location ID is the mandatory field and if any one don't have location ID for customer / vendor masters then upload in data entity "Registration numbers" wont work.

    Finally i removed those three rows of the customers where i did not have location ID and upload worked successfully.

    Ideally, i should have the clear message in the execution log, or staging log details areas but somehow nothing was appearing here.

    Hope above explanation helps other community members too.

    Regards

    Muhammad Matloob

  • Mariano Gracia Profile Picture
    on at

    I faced that issue once when an user tried to upload a csv file wich contained an empty row at the end of the file

  • simonsmith101 Profile Picture
    6 on at

    We had exactly the same issue. I opened the excel copied the data into a new work book and reimported and it worked. Not sure why but hey....

  • Suggested answer
    Ramit Paul Profile Picture
    22,809 Most Valuable Professional on at

    This is purely data issue.

    Check the above suggestions to check journal names.

    If your journal name is different than other lines, it won't allow.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans