I'm creating a journal entry through x++ with fixed assets.. I set the ledger transaction with a fixed asset account, save and then use ledger journal engine to "refresh" and trigger it so it sets the value model combination behind the scenes. It does set the value model, but when I go to validate it complains that its not set. When I click on the line and go validate, the error essentially Disappears and goes to the next line to complain. If i click on every line and click validate , the error goes away and eventually the journal is ok to post. My question is, is there something else to call or trigger where it will know that this is set properly without bringing up this error.
Here is a code snip below, I construct the journalTrans and set all the other parameters as well, journalNum, currency etc.
ledgerJournalTrans ledgerJournalTrans;
LedgerJournalEngine lje;
AxLedgerJournalTrans journalTrans;
journalTrans = AxLedgerJournalTrans::construct();
journalTrans.parmAccountType(LedgerJournalACType::FixedAssets);
journalTrans.parmOffsetAccountType(LedgerJournalACType::Ledger);
journalTrans.parmLedgerDimension(DimensionStorage::getDynamicAccount("Fixed asset Account #", LedgerJournalACType::FixedAssets));
journalTrans.save();
ledgerJournalTrans = journalTrans.ledgerJournalTrans();
lje = LedgerJournalEngine::construct(ledgerJournalTrans.ledgerJournalTable().JournalType);
lje.accountModified(LedgerJournalTrans);
ledgerJournalTrans.update();