Add a field to InventJournalTrans, propagate to InventTrans

20 Jun

The link above does contain the solution — I have included the code from that page in case that page disappears or no longer becomes available. Thanks to gl00mie for answering on that site and providing this answer.
You should create a new InventMovement method like this:

public MyNewFieldType myNewField() { return MyNewFieldType::DefaultValue; // suppose your new field is an enum } 

Then modify \Classes\InventMovement\initInventTransFromBuffer

void initInventTransFromBuffer(InventTrans _inventTrans, InventMovement _movement_orig) { // ... append this line to the end of whatever else is already in this method _inventTrans.MyNewField = this.myNewField(); } 

And finally overload the new method in the InventMov_Journal class:

public MyNewFieldType myNewField() { return inventJournalTrans.MyNewField; } 
1 Comment

Posted by on June 20, 2012 in X++



One response to “Add a field to InventJournalTrans, propagate to InventTrans

  1. Hammad Ali

    November 8, 2016 at 2:25 pm

    Thank you so much its very useful information 🙂 appreciated



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Blog about ax with sample codes, tips and tricks.

GM Dynamics Blogs

Transform IT with Digital Trasformation and Social Innovation

Ms. Dynamic Millennial

Unboxing Microsoft Dynamics 365 for Finance and Operations


Exploring the new vision of the Power platform

Dynamics Vision 365

The FinOps pulse

Breaking Bong

I write when no one is watching


Microsoft Dynamics 365 Business Management Solution Enthusiast

Dynamics 365 Finance

Dynamics 365 Finance & Much More.

Microsoft Dynamics AX


Sumit Potbhare

Dynamics 365 for Commerce

This is your site about D365 (Finance and Supply Chain Management), IoT (Internet of Things) and HoloLens

Omni 365

Dynamics 365 Finance and Operations Blog

DIY D365

Power Platform Done Your Way

Azure Integration services for Dynamics 365

Azure Integration services for Dynamics 365 Unified Operations, Logic Apps, Azure Functions, REST

%d bloggers like this: