hi All,
AX 2009
In ledger settlement form, when user select multiple records MANUALLY and clicked on Include button then as per standard functionality those line appeared in BELOW GRID as below
But user wants this process to AUTOMATE. So, i have added MARK check box in Ledger Trans table and marked the voucher based on excel template. That i have done through Import voucher button clicked. Which voucher is matched with excel that voucher get mark = YES. It's working fine.
But when i clicked on INCLUDE button it's only insert SINGLE VOUCHER (FAQ-007702) in BELOW GRID as below. I expect to get voucher FAQ-007702, FAQ-007706, FAQ-007709
CODE : Include button > Clicked method >
void clicked()
{
LedgerTrans ledgerTransLocal;
;
ttsbegin;
ledgerTransLocal.recordLevelSecurity(true);
for (ledgerTransLocal = ledgerTrans_ds.getFirst(true) ? ledgerTrans_ds.getFirst(true) : ledgerTrans;
ledgerTransLocal;
ledgerTransLocal = ledgerTrans_ds.getNext())
{
element.includeTrans(ledgerTransLocal);
}
ttscommit;
tmpLedgerTrans_ds.research();
ledgerTrans_ds.next();
}
IncludeTrans() --
void includeTrans(LedgerTrans _ledgerTrans)
{
;
if (!mapTrans2TmpTrans.exists(_ledgerTrans.RecId))
{
tmpLedgerTrans.data(_ledgerTrans);
tmpLedgerTrans.doInsert();
mapTrans2TmpTrans.insert(_ledgerTrans.RecId, tmpLedgerTrans.RecId);
mapTmpTrans2Trans.insert(tmpLedgerTrans.RecId, _ledgerTrans.RecId);
balanceAmountMST = _ledgerTrans.AmountMST;
}
}
Kindly let me know how will achieve this ?
Please give me more shed on this.