can’t set axLedgerJournalTrans.parmOffsetLedgerDimension on AX2012 R3

found a better solution from post comment :

AxLedgerJournalTrans.clearField(fieldNum(ledgerJournalTrans, offsetLedgerDimension), false);
Advertisements

4 thoughts on “can’t set axLedgerJournalTrans.parmOffsetLedgerDimension on AX2012 R3

  1. 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();

  2. You can just call this before setting the offset account:

    AxLedgerJournalTrans.clearField(fieldNum(ledgerJournalTrans, offsetLedgerDimension), false);

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s