Dynamics AX 2009:将字段添加到 InventJournalTrans,传播到 InventTrans
我需要向 InventJournalTrans 添加一个附加字段,该字段在发布后将显示在 InventTrans 表中。该字段是另一个表中记录的引用列。我需要修改哪些方法才能实现此行为?
目前,我已经将字段添加到两个表中,并修改了表单以允许用户输入并保存新字段。我似乎无法找到实际发布到InventTrans发生的兔子洞的底部。
理想情况下,它应该只是在
; 调用之前的 inventTrans.ReasonRefRecId = inventJournalTrans.ReasonRefRecId;
赋值语句
inventTrans.insert()
。有人知道这是在哪里吗?
I need to add an additional field to InventJournalTrans, that after posting will show up in the InventTrans table. The field is a reference column to a record in another table. What method(s) do I need to modify to make this behavior happen?
Currently, I have already added the fields to both tables and modified the Form to allow the user to enter and save the new field. I just can't seem to find the bottom of the rabbit hole on where the actual posting to InventTrans is occurring.
Ideally, it should just be a:
inventTrans.ReasonRefRecId = inventJournalTrans.ReasonRefRecId;
assignment statement before the
inventTrans.insert();
call. Anybody have a clue on where this is at?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上面的链接确实包含解决方案 - 我已包含该页面中的代码,以防该页面消失或不再可用。感谢 gl00mie 在该网站上的回答并提供了这个答案。
您应该像这样创建一个新的 InventMovement 方法:
然后修改 \Classes\InventMovement\initInventTransFromBuffer
最后重载 InventMov_Journal 类中的新方法:
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:
Then modify \Classes\InventMovement\initInventTransFromBuffer
And finally overload the new method in the InventMov_Journal class: