Pass Customized Fields to GeneralJournalAccountEntry Table

 

In this tutorial I am going to show you how to pass a customized field to the GeneralJournalAccountEntry Table, when a ledger to ledger voucher is posted

Scenario - For example lets say you have a new vertical with industry relevant fields and you want to see your financial reports or TB based on this field. In order to  fullfill this requirement we will have to pass this field throughout AX 2012, mainly the General Journal Account Entry Table.

Step 1. Create this field in the LedgerJournalTrans Table and GeneralJournalAccountEntryTable.

Step 2. Declare this field in the class declaration of the LedgerVoucherObjectClass

Step 3. Create a parm method in the LedgerVoucherObject Class.

 public ARNID parmARNID(ARNID _ARNID = ARNID)  
 {  
    ARNID = _ARNID;  
    return ARNID;  
 }  

Step 5 Create a parm method in the LedgerVoucherTransObject Class

 public ARNID parmARNID(ARNID _ARNID = ARNID)  
 {  
    generalJournalAccountEntry.ARNID = _ARNID;  
    return generalJournalAccountEntry.ARNID;  
 }  

Step 6 Add the following line of code to the getLedgerPostingTransaction method of the LedgerVoucherTransObject Class

 _LedgerPostingTransaction.ARNID = GeneralJournalAccountEntry.ARNID  

Step 7 Add the following line of code to the initFromLedgerPostingTransactoin method of the LedgerVoucherTransObject Class

 GeneralJournalAccountEntry.ARNID = _LedgerPostingTransaction.ARNID;  


Step 8 Add the following line of code to the newTransLedgerJournal method of the LedgerVoucherTransObject Class

 ledgerTransObject.parmARNID(_ledgerJournalTrans.ARNID);

In the coming days I will write similar posts for how we can do the same for


  1. BankTrans
  2. CustTrans
  3. VendTrans
posted @   adingkui  阅读(505)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
点击右上角即可分享
微信分享提示