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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Dynamics 365 Vs Me / Intercompany Journal Import...

Intercompany Journal Import in D365FO [via customization]

Deepak Agarwal Profile Picture Deepak Agarwal 8,665
Hi Folks, 

Intercompany (also known as cross company) journal imports are a common requirement in multi company environments, but there are no standard data entity to support this. However LedgerJournalTrans table have fields for Company or OffsetCompany  but these are not exposed to LedgerJournalEntity

Fortunately, D365FO’s extensibility model allows us to extend both the entity and the underlying data model cleanly, with minimum development. 

First lets understand what all I need to achieve this, 
1. LedgerJournalEntity  entity Extension
2. LedgerJournalEntityStaging table extension 
3. Extension class for LedgerJournalEntity  

Step 1: Extend LedgerJournalEntity and copy 'Company' and 'OffsetCompany' from entity datasource table (LedgerJournalTrans) and add them in entity field node.


Step 2: Extend LedgerJournalEntityStaging table and add both fields in this table (you can copy fields from LedgerJournalTrans table).


Step 3: Create an extension class for LedgerJournalEntity  and extend 'CopyCustomStagingToTarget' method, and add below code,


<Gist code above>
 build and synch your solution and you are all set to import intercompany journals. 

Hope this helps. 

Thanks, 
-Harry Follow us on Facebook to keep in rhythm with us. https:fb.com/theaxapta

This was originally posted here.

Comments

*This post is locked for comments