Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Data integration - tra...
Finance forum
Unanswered

Data integration - transmitting a Journal Header and its Lines

Posted on by 14
I have experimented with both DMF (data management framework) as well as the the OData API, in an attempt to import a Journal Header, and its lines, atomically (single transaction).
 
OData API attempts
- /data/LedgerJournalHeaders allows me to post a header only. Attempting to include its "Lines" in the same call results in a "cannot patch " error for the lines I am attempting to send. 
- Tried to use the /data/batch endpoint to leverage OData's support for batch operations. However you cannot send a header and its lines in the same change set, because the payload for a line (/data/LedgerJournalLines) has a property that has to refer to the ID of the header. This means the header must be created first to get its ID, and only then can you create the lines. This is in line with how the "General journals" UI works in Finance.
 
DMF Attempts
There is a data entity called "General journal" that contains both the header level and line level in a single entity. This seems to be the recommended entity to use for batch import scenarios. I created a data project in Finance, and exported an sample package which contained the csv, and the manifest files. I then edited the CSV file to contain a journal with 2 lines, the first line I used an invalid account. I imported this package into dynamics finance. It picked up an error for the invalid line as i'd expect, however the valid line was imported. The end result is a partial journal in dynamics, with one line - this is what I am trying to prevent.
 
Am I missing something? 
 
 
 
Categories:
  • Anthony Blake Profile Picture
    Anthony Blake 1,207 on at
    Data integration - transmitting a Journal Header and its Lines
    Hi Darrell
     
    For the DMF run, do you have Set based processing enabled at General Journal entity level?
     
     
    Anthony

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans