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.
Step 5 Create a parm method in the LedgerVoucherTransObject Class
Step 6 Add the following line of code to the getLedgerPostingTransaction method of the LedgerVoucherTransObject Class
Step 7 Add the following line of code to the initFromLedgerPostingTransactoin method of the LedgerVoucherTransObject Class
Step 8 Add the following line of code to the newTransLedgerJournal method of the LedgerVoucherTransObject Class
In the coming days I will write similar posts for how we can do the same for
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
- BankTrans
- CustTrans
- VendTrans
分类:
AX 2012
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂