June 26, 2026

QuickFix: Entity extension DB synch error (Unexpected Metadata Corruption )


I added a new field in standard Vendor v2 entity but after successful build and synch it suddenly started giving DB issue when code deployed to anther dev instance. 

When investigate, found strange issue, 

The extension entity icon got changed, 



Even the property window for this entity showing below error like incorrect meta data.

To fix this, I opened the XML file for this entity extension from my model folder and found some strange code there, still not sure how then ended up there . So hat I did is open other entity extension from metadata and compared both and removed any extra values in file. 

Refresh you model in VS and try to build and synch again



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

April 20, 2026

Intercompany Journal Import in D365FO [via customization]

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