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

浙公网安备 33010602011771号