found a better solution from post comment :
AxLedgerJournalTrans.clearField(fieldNum(ledgerJournalTrans, offsetLedgerDimension), false);
found a better solution from post comment :
AxLedgerJournalTrans.clearField(fieldNum(ledgerJournalTrans, offsetLedgerDimension), false);
I came across same issue. rather than modifying the standard method i solved it by calling twice, call parmOffsetLedgerDimension() then save and again call and save. On the second call the offsetLedgerdimension gets inside the block.
I had done this for creation and posting of general journal through code.
journalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(offSetAcctPattern));
journalTrans.save();
journalTrans.parmOffsetLedgerDimension(AxdDimensionUtil::getLedgerAccountId(offSetAcctPattern));
journalTrans.save();
wouldn’t it become 2 lines ?
You can just call this before setting the offset account:
AxLedgerJournalTrans.clearField(fieldNum(ledgerJournalTrans, offsetLedgerDimension), false);
nice code.
thanks stephen 🙂
I found another solution to this problem that I hope will help.
journalTrans.parmSkipExternalOffsetAccount(true);
.. offset parm calls